Bug-Assist: Assisting Fault Localization in ANSI-C Programs
Several verification tools exist for checking safety properties of programs and reporting errors. However, a large part of the program development cycle is spend in analyzing the error trace to isolate locations in the code that are potential causes of the bug. Currently, this is usually performed manually, by stepping through the error trace in a debugger. We describe Bug-Assist, a tool that assists programmers localize error causes to a few lines of code. Bug-Assist takes as input an ANSI-C program annotated with assertions, performs bounded model checking to find potential assertion violations, and for each error trace returned by the model checker, returns a set of lines of code which can be changed to eliminate the error trace. Bug-Assist formulates error localization as a MAX-SAT problem and uses scalable MAX-SAT solvers. In experiments on a set of C benchmarks, Bug-Assist was able to reduce error traces to only a few lines of code. Bug-Assist is available as an Eclipse plug-in, enabling its easy deployment in the code development phase.
KeywordsTrace Formula Conjunctive Normal Form Boolean Formula Bounded Model Check Integrate Development Environ
- 1.Ball, T., Naik, M., Rajamani, S.K.: From symptom to cause: localizing errors in counterexample traces. In: POPL 2003: Principles of Programming Languages, pp. 97–105. ACM, New York (2003)Google Scholar
- 2.Biere, A., Cimatti, A., Clarke, E.M., Fujita, M., Zhu, Y.: Symbolic model checking using SAT procedures instead of BDDs. In: DAC 1999: Design Automation Conference, pp. 317–320. ACM, New York (1999)Google Scholar
- 6.Jones, J.A., Harrold, M.J.: Empirical evaluation of the tarantula automatic fault-localization technique. In: ASE 2005: Automated Software Engineering, pp. 273–282. ACM, New York (2005)Google Scholar
- 7.Jose, M., Majumdar, R.: Cause clue clauses: Error localization using maximum satisfiability. In: PLDI 2011: Programming Language Design and Implementation, ACM, New York (2011)Google Scholar