Probabilistic Delta debugging

The delta debugging problem concerns how to reduce an object while preserving a certain property, and widely exists in many applications, such as compiler development, regression fault localization, and software debloating. Given the importance of delta debugging, multiple algorithms have been proposed to solve the delta debugging problem efficiently and effectively. However, the efficiency and effectiveness of the state-of-the-art algorithms are still not satisfactory. For example, the state-of-the-art delta debugging tool, CHISEL, may take up to 3 hours to reduce a single program with 14,092 lines of code, while the reduced program may be up to 2 times unnecessarily large. In this paper, we propose a probabilistic delta debugging algorithm (named ProbDD) to improve the efficiency and the effectiveness of delta debugging. Our key insight is, the ddmin algorithm, the basic algorithm upon which many existing approaches are built, follows a predefined sequence of attempts to remove elements from a sequence, and fails to utilize the information from existing test results. To address this problem, ProbDD builds a probabilistic model to estimate the probabilities of the elements to be kept in the produced result, selects a set of elements to maximize the gain of the next test based on the model, and improves the model based on the test results. We prove the correctness of ProbDD, and analyze the minimality of its result and the asymptotic number of tests under the worst case. The asymptotic number of tests in the worst case of ProbDD is O(n), which is smaller than that of ddmin, O(n2) worst-case asymptotic number of tests. Furthermore, we experimentally compared ProbDD with ddmin on 40 subjects in HDD and CHISEL, two approaches that wrap ddmin for reducing trees and C programs, respectively. The results show that, after replacing ddmin with ProbDD, HDD and CHISEL produce 59.48% and 11.51% smaller results and use 63.22% and 45.27% less time, respectively.

[1]  Peter I. Frazier,et al.  A Tutorial on Bayesian Optimization , 2018, ArXiv.

[2]  Alessandro Orso,et al.  Program Debloating via Stochastic Optimization , 2020, 2020 IEEE/ACM 42nd International Conference on Software Engineering: New Ideas and Emerging Results (ICSE-NIER).

[3]  Michael Pradel,et al.  Automatically reducing tree-structured test inputs , 2017, 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE).

[4]  Alex Groce,et al.  Reduce Before You Localize: Delta-Debugging and Spectrum-Based Fault Localization , 2018, 2018 IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW).

[5]  Andreas Zeller,et al.  Simplifying and Isolating Failure-Inducing Input , 2002, IEEE Trans. Software Eng..

[6]  Kian Hsiang Low,et al.  Bayesian Optimization with Binary Auxiliary Information , 2019, UAI.

[7]  Tibor Gyimóthy,et al.  Coarse Hierarchical Delta Debugging , 2017, 2017 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[8]  Thomas Zimmermann,et al.  Automatic Identification of Bug-Introducing Changes , 2006, 21st IEEE/ACM International Conference on Automated Software Engineering (ASE'06).

[9]  Lu Zhang,et al.  Coverage Prediction for Accelerating Compiler Testing , 2021, IEEE Transactions on Software Engineering.

[10]  Mayur Naik,et al.  Learning minimal abstractions , 2011, POPL '11.

[11]  Andreas Zeller,et al.  Yesterday, my program worked. Today, it does not. Why? , 1999, ESEC/FSE-7.

[12]  Dingyi Fang,et al.  Automated conformance testing for JavaScript engines via deep compiler fuzzing , 2021, PLDI.

[13]  Andreas Zeller,et al.  Why Programs Fail: A Guide to Systematic Debugging , 2005 .

[14]  Ákos Kiss,et al.  Modernizing hierarchical delta debugging , 2016, A-TEST@SIGSOFT FSE.

[15]  Zhendong Su,et al.  Perses: Syntax-Guided Program Reduction , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE).

[16]  Andreas Zeller,et al.  Isolating cause-effect chains from computer programs , 2002, SIGSOFT FSE.

[17]  Andreas Zeller,et al.  Locating causes of program failures , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[18]  Xuejun Yang,et al.  Test-case reduction for C compiler bugs , 2012, PLDI.

[19]  Lalit M. Patnaik,et al.  Genetic algorithms: a survey , 1994, Computer.

[20]  Robert Feldt,et al.  MOAD: Modeling Observation-Based Approximate Dependency , 2019, 2019 19th International Working Conference on Source Code Analysis and Manipulation (SCAM).

[21]  Supratik Chakraborty,et al.  From Weighted to Unweighted Model Counting , 2015, IJCAI.

[22]  Tibor Gyimóthy,et al.  HDDr: a recursive variant of the hierarchical Delta debugging algorithm , 2018, A-TEST@ESEC/SIGSOFT FSE.

[23]  Junjie Chen,et al.  History-Guided Configuration Diversification for Compiler Test-Program Generation , 2019, 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[24]  David Dohan,et al.  Amortized Bayesian Optimization over Discrete Spaces , 2020, UAI.

[25]  Zhendong Su,et al.  HDD: hierarchical delta debugging , 2006, ICSE.

[26]  D. Goldberg,et al.  BOA: the Bayesian optimization algorithm , 1999 .

[27]  Lingming Zhang,et al.  Compiler bug isolation via effective witness test program generation , 2019, ESEC/SIGSOFT FSE.

[28]  Alastair F. Donaldson,et al.  Test-case reduction and deduplication almost for free with transformation-based compiler testing , 2021, PLDI.

[29]  Rui Abreu,et al.  Exploiting count spectra for Bayesian fault localization , 2010, PROMISE '10.

[30]  Mayur Naik,et al.  Effective Program Debloating via Reinforcement Learning , 2018, CCS.