Specification-Based Program Repair Using SAT

  • Divya Gopinath
  • Muhammad Zubair Malik
  • Sarfraz Khurshid
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6605)

Abstract

Removing bugs in programs – even when location of faulty statements is known – is tedious and error-prone, particularly because of the increased likelihood of introducing new bugs as a result of fixing known bugs. We present an automated approach for generating likely bug fixes using behavioral specifications. Our key insight is to replace a faulty statement that has deterministic behavior with one that has nondeterministic behavior, and to use the specification constraints to prune the ensuing nondeterminism and repair the faulty statement. As an enabling technology, we use the SAT-based Alloy tool-set to describe specification constraints as well as for solving them. Initial experiments show the effectiveness of our approach in repairing programs that manipulate structurally complex data. We believe specification-based automated debugging using SAT holds much promise.

Keywords

Fault Localization Omission Error Repair Time Concrete State Control Flow Graph 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

References

  1. 1.
    Andoni, A., Daniliuc, D., Khurshid, S., Marinov, D.: Evaluating the ”Small Scope Hypothesis”. Technical report, MIT CSAIL (2003)Google Scholar
  2. 2.
    Blackburn, S.M., et al.: The DaCapo benchmarks: Java benchmarking development and analysis. In: OOPSLA (2006)Google Scholar
  3. 3.
    Collofello, J.S., Cousins, L.: Towards automatic software fault location through decision-to-decision path analysisGoogle Scholar
  4. 4.
    Dennis, G., Chang, F.S.-H., Jackson, D.: Modular verification of code with SAT. In: ISSTA (2006)Google Scholar
  5. 5.
    Elkarablieh, B., Khurshid, S.: Juzi: A tool for repairing complex data structures. In: ICSE (2008)Google Scholar
  6. 6.
    Jackson, D.: Software Abstractions: Logic, Language and Analysis. MIT-P, Cambridge (2006)Google Scholar
  7. 7.
    Jackson, D., Vaziri, M.: Finding bugs with a constraint solver. In: ISSTA (2000)Google Scholar
  8. 8.
    Jeffrey, D., Feng, M., Gupta, N., Gupta, R.: BugFix: A learning-based tool to assist developers in fixing bugs. In: ICPC (2009)Google Scholar
  9. 9.
    Jobstmann, B., Griesmayer, A., Bloem, R.: Program repair as a game. In: Etessami, K., Rajamani, S.K. (eds.) CAV 2005. LNCS, vol. 3576, pp. 226–238. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  10. 10.
    Jones, J.A.: Semi-Automatic Fault Localization. PhD thesis, Georgia Institute of Technology (2008)Google Scholar
  11. 11.
    Malik, M.Z., Ghori, K., Elkarablieh, B., Khurshid, S.: A case for automated debugging using data structure repair. In: ASE (2009)Google Scholar
  12. 12.
    Marinov, D., Khurshid, S.: TestEra: A novel framework for automated testing of Java programs (2001)Google Scholar
  13. 13.
    Parr, T., et al.: Another tool for language recognition, http://www.antlr.org/
  14. 14.
    Renieris, M., Reiss, S.P.: Fault localization with nearest neighbor queries. In: ASE (2003)Google Scholar
  15. 15.
    Solar-Lezama, A.: The sketching approach to program synthesis. In: Hu, Z. (ed.) APLAS 2009. LNCS, vol. 5904, pp. 4–13. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  16. 16.
    Torlak, E., Jackson, D.: Kodkod: A relational model finder. In: Grumberg, O., Huth, M. (eds.) TACAS 2007. LNCS, vol. 4424, pp. 632–647. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  17. 17.
    Wei, Y., Pei, Y., Furia, C.A., Silva, L.S., Buchholz, S., Meyer, B., Zeller, A.: Automated fixing of programs with contracts. In: ISSTA (2010)Google Scholar
  18. 18.
    Weimer, W.: Patches as better bug reports. In: GPCE (2006)Google Scholar
  19. 19.
    Weimer, W., Nguyen, T., Goues, C.L., Forrest, S.: Automatically finding patches using genetic programming. In: ICSE (2009)Google Scholar
  20. 20.
    Weiser, M.: Programmers use slices when debugging. Commun. ACM (1982)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Divya Gopinath
    • 1
  • Muhammad Zubair Malik
    • 1
  • Sarfraz Khurshid
    • 1
  1. 1.The University of TexasAustinUSA

Personalised recommendations