Locating faults through automated predicate switching
Top Cited Papers
- 28 May 2006
- proceedings article
- Published by Association for Computing Machinery (ACM)
- p. 272-281
- https://doi.org/10.1145/1134285.1134324
Abstract
Typically debugging begins when during a program execution a point is reached at which an obviously incorrect value is observed. A general and powerful approach to automated debugging can be based upon identifying modifications to the program state that will bring the execution to a successful conclusion. However, searching for arbitrary changes to the program state is difficult due to the extremely large search space. In this paper we demonstrate that by forcibly switching a predicate's outcome at runtime and altering the control flow, the program state can not only be inexpensively modified, but in addition it is often possible to bring the program execution to a successful completion (i.e., program produces the desired output). By examining the switched predicate, also called the critical predicate, the cause of the bug can then be identified. Since the outcome of a branch can only be either true or false, the number of modified states resulting by predicate switching is far less than those possible through arbitrary state changes. Thus, it is possible to automatically search through modified states to find one that leads to the correct output. We have developed an implementation based upon dynamic instrumentation to perform this search through program re-execution -- the program is executed from the beginning and a predicate's outcome is switched to produce the desired change in control flow. To evaluate our approach, we tried our technique on several reported bugs for a number of UNIX utility programs. Our technique was found to be practical (i.e., acceptable in time taken) and effective (i.e., we were able to automatically identify critical predicates). Moreover we show that bidirectional dynamic slices of critical predicates capture the faulty code.Keywords
This publication has 16 references indexed in Scilit:
- Locating faulty code using failure-inducing chopsPublished by Association for Computing Machinery (ACM) ,2005
- Experimental evaluation of using dynamic slices for fault locationPublished by Association for Computing Machinery (ACM) ,2005
- Locating causes of program failuresPublished by Association for Computing Machinery (ACM) ,2005
- Cost effective dynamic program slicingPublished by Association for Computing Machinery (ACM) ,2004
- Using redundancies to find errorsPublished by Association for Computing Machinery (ACM) ,2002
- Isolating cause-effect chains from computer programsPublished by Association for Computing Machinery (ACM) ,2002
- Simplifying and isolating failure-inducing inputIEEE Transactions on Software Engineering, 2002
- Tracking down software bugs using automatic anomaly detectionPublished by Association for Computing Machinery (ACM) ,2002
- Simplifying failure-inducing inputPublished by Association for Computing Machinery (ACM) ,2000
- Dynamic program slicingInformation Processing Letters, 1988