Automated Debugging Using Path-Based Weakest Preconditions

Software debugging is the activity of locating and correcting erroneous statements in programs. Automated tools to locate and correct the erroneous statements in a program can significantly reduce the cost of software development. In this paper, we present a new approach to locate and correct an erroneous statement in a function. We assume the correct specification of the erroneous function is available in the form of preconditions and postconditions of the function. Our approach combines ideas from software testing and weakest preconditions used in correctness proof methods to locate a likely erroneous statement. We have implemented our approach and conducted experiments with several small programs. In our experiments, our approach was able to locate the erroneous statements in a large number of cases. Our preliminary experimental results show that our approach has potential for development of an automated bug location and correction tool.

[1]  John T. Stasko,et al.  Visualization of test information to assist fault localization , 2002, ICSE '02.

[2]  Eugene H. Spafford,et al.  Critical slicing for software fault localization , 1996, ISSTA '96.

[3]  Steven P. Reiss,et al.  Fault localization with nearest neighbor queries , 2003, 18th IEEE International Conference on Automated Software Engineering, 2003. Proceedings..

[4]  Michael D. Ernst,et al.  Invariant inference for static checking: an empirical evaluation , 2002, SOEN.

[5]  K. Rustan M. Leino,et al.  Checking Java Programs via Guarded Commands , 1999, ECOOP Workshops.

[6]  Bogdan Korel,et al.  Application of Dynamic Slicing in Program Debugging , 1997, AADEBUG.

[7]  Sudheendra Hangal,et al.  Tracking down software bugs using automatic anomaly detection , 2002, ICSE '02.

[8]  Michael D. Ernst,et al.  Invariant inference for static checking: , 2002, SIGSOFT '02/FSE-10.

[9]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

[10]  David Gries,et al.  The Science of Programming , 1981, Text and Monographs in Computer Science.

[11]  A. Zeller Isolating cause-effect chains from computer programs , 2002, SIGSOFT '02/FSE-10.

[12]  Lori A. Clarke,et al.  The application of error-sensitive testing strategies to debugging , 1983, SIGSOFT '83.

[13]  Joseph Robert Horgan,et al.  Fault localization using execution slices and dataflow tests , 1995, Proceedings of Sixth International Symposium on Software Reliability Engineering. ISSRE'95.

[14]  Robert S. Boyer,et al.  A computational logic handbook , 1979, Perspectives in computing.

[15]  Raimondas Lencevicius,et al.  On-the-fly query-based debugging with examples , 2000, AADEBUG.

[16]  Andreas Zeller,et al.  Simplifying failure-inducing input , 2000, ISSTA '00.

[17]  Ehud Shapiro,et al.  Algorithmic Program Debugging , 1983 .

[18]  Todd D. Millstein,et al.  Generating error traces from verification-condition counterexamples , 2005, Sci. Comput. Program..

[19]  Raimondas Lencevicius Static Query-Based Debugging , 2000 .