ABSTRACT
We study the problem of suggesting code repairs at design time, based on the warnings issued by modular program verifiers. We introduce the concept of a verified repair, a change to a program's source that removes bad execution traces while increasing the number of good traces, where the bad/good traces form a partition of all the traces of a program. Repairs are property-specific. We demonstrate our framework in the context of warnings produced by the modular cccheck (a.k.a. Clousot) abstract interpreter, and generate repairs for missing contracts, incorrect locals and objects initialization, wrong conditionals, buffer overruns, arithmetic overflow and incorrect floating point comparisons. We report our experience with automatically generating repairs for the .NET framework libraries, generating verified repairs for over 80% of the warnings generated by cccheck.
- S. Chandra, E. Torlak, S. Barman, and R. Bodık. Angelic debugging. In ICSE, 2011. Google ScholarDigital Library
- E. M. Clarke, O. Grumberg, S. Jha, Y. Lu, and H. Veith. Counterexample-guided abstraction refinement. In CAV, 2000. Google ScholarDigital Library
- P. Cousot. Constructive design of a hierarchy of semantics of a transition system by abstract interpretation. Theor. Comput. Sci., 277(1--2), 2002. Google ScholarDigital Library
- P. Cousot and R. Cousot. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In ACM POPL, 1977. Google ScholarDigital Library
- P. Cousot, R. Cousot, and F. Logozzo. A parametric segmentation functor for fully automatic and scalable array content analysis. In POPL, 2011. Google ScholarDigital Library
- P. Cousot, R. Cousot, and F. Logozzo. Precondition inference from intermittent assertions and application to contracts on collections. In VMCAI, 2011. Google ScholarDigital Library
- P. Cousot, R. Cousot, F. Logozzo, and M. Barnett. An abstract interpretation framework for refactoring with application to extract methods with contracts. In OOPSLA, 2012. Google ScholarDigital Library
- I. Dillig, T. Dillig, and A. Aiken. Automated error diagnosis using abductive inference. In PLDI, 2012. Google ScholarDigital Library
- B. Elkarablieh, S. Khurshid, D. Vu, and K. S. McKinley. Starc: static analysis for efficient repair of complex data. In OOPSLA, 2007. Google ScholarDigital Library
- M. Fahndrich. Static verification for Code Contracts. In SAS, 2010. Google ScholarDigital Library
- M. Fahndrich and K. R. M. Leino. Declaring and checking non-null types in an object-oriented language. In ACM OOPSLA, 2003. Google ScholarDigital Library
- M. Fahndrich and F. Logozzo. Static contract checking with abstract interpretation. In FoVeOOS, 2010. Google ScholarDigital Library
- Eclipse Foundation. Eclipse.texttthttp://eclipse.org, 2011.Google Scholar
- A. Griesmayer, R. Bloem, and B. Cook. Repair of boolean programs with an application to c. In CAV, 2006. Google ScholarDigital Library
- C. A. R. Hoare. An axiomatic basis for computer programming. Commun. ACM, 12(10), 1969. Google ScholarDigital Library
- B. Jobstmann, A. Griesmayer, and R. Bloem. Program repair as a game. In CAV, 2005. Google ScholarDigital Library
- M. Jose and R. Majumdar. Cause clue clauses: error localization using maximum satisfiability. In PLDI, 2011. Google ScholarDigital Library
- V. Laviron and F. Logozzo. Subpolyhedra: A (more) scalable approach to infer linear inequalities. In VMCAI, 2009. Google ScholarDigital Library
- C. Le Goues, M. Dewey-Vogt, S. Forrest, and W. Weimer. A systematic study of automated program repair: Fixing 55 out of 105 bugs for$8 each. In ICSE, 2012. Google ScholarDigital Library
- B. Liskov and J. M. Wing. A behavioral notion of subtyping. ACM Trans. Program. Lang. Syst., 16(6), 1994. Google ScholarDigital Library
- F. Logozzo, M. Barnett, P. Cousot, R. Cousot, and M. F\"ahndrich. A semantic integrated development environment. In OOPSLA Companion, 2012. Google ScholarDigital Library
- F. Logozzo and M. Fahndrich. Pentagons: a weakly relational abstract domain for the efficient validation of array accesses. In SAC, 2008. Google ScholarDigital Library
- F. Logozzo and M. Fahndrich. Checking compatibility of bit sizes in floating point comparison operations. In 3rd workshop on Numerical and Symbolic Abstract Domains, ENTCS, 2011.Google Scholar
- M. Martel. Program transformation for numerical precision. In PEPM, 2009. Google ScholarDigital Library
- B. Meyer. Applying "Design by Contract". IEEE Computer, 25(10):40--51, 1992. Google ScholarDigital Library
- Microsoft. Roslyn CTP. http://msdn.microsoft.com/en-us/roslyn, 2011.Google Scholar
- J. H. Perkins, S. Kim, S. Larsen, S. P. Amarasinghe, J. Bachrach, M. Carbin, C. Pacheco, F. Sherwood, S. Sidiroglou, G. Sullivan, W.-F. Wong, Y. Zibin, M. D. Ernst, and M. Rinard. Automatically patching errors in deployed software. In ACM SOSP, 2009. Google ScholarDigital Library
- M. Pezzè, M. C. Rinard, W. Weimer, and A. Zeller. Self-repairing programs (Dagstuhl seminar 11062). Dagstuhl Reports, 1(2):16--29, 2011.Google Scholar
- X. Rival. Understanding the origin of alarms in astrée. In SAS, 2005. Google ScholarDigital Library
- R. Samanta, J. V. Deshmukh, and E. A. Emerson. Automatic generation of local repairs for boolean programs. In FMCAD, 2008. Google ScholarDigital Library
- H. Samimi, M. Sch\"afer, S. Artzi, T. D. Millstein, F. Tip, and L. J. Hendren. Automated repair of html generation errors in php applications using string constraint solving. In ICSE, 2012. Google ScholarDigital Library
- N. Tillmann and J. de Halleux. Pex-white box test generation for .net. In TAP, 2008. Google ScholarDigital Library
- M. T. Vechev, E. Yahav, and G. Yorsh. Abstraction-guided synthesis of synchronization. In POPL, 2010. Google ScholarDigital Library
- Y. Wei, Y. Pei, C. A. Furia, L. S. Silva, S. Buchholz, B. Meyer, and A. Zeller. Automated fixing of programs with contracts. In ISSTA, pages 61--72, 2010. Google ScholarDigital Library
- W. Weimer, T. Nguyen, C. Le Goues, and S. Forrest. Automatically finding patches using genetic programming. In ICSE, 2009. Google ScholarDigital Library
- M. W. Whalen, P. Godefroid, L. Mariani, A. Polini, N. Tillmann, and W. Visser. Fite: future integrated testing environment. In FoSER, 2010. Google ScholarDigital Library
Index Terms
- Modular and verified automatic program repair
Recommendations
Modular and verified automatic program repair
OOPSLA '12We study the problem of suggesting code repairs at design time, based on the warnings issued by modular program verifiers. We introduce the concept of a verified repair, a change to a program's source that removes bad execution traces while increasing ...
A semantic integrated development environment
SPLASH '12: Proceedings of the 3rd annual conference on Systems, programming, and applications: software for humanityWe present SIDE, a Semantic Integrated Development Environment. SIDE uses static analysis to enrich existing IDE features and also adds new features. It augments the way existing compilers find syntactic errors - in real time, as the programmer is ...
Model and Program Repair via SAT Solving
Special Issue on MEMCODE 2015 and Regular Papers (Diamonds)We consider the subtractive model repair problem: given a finite Kripke structure M and a CTL formula η, determine if M contains a substructure M′ that satisfies η. Thus, M can be “repaired” to satisfy eta by deleting some transitions and states. We map ...
Comments