skip to main content
10.1145/2384616.2384626acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Modular and verified automatic program repair

Published: 19 October 2012 Publication History

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.

References

[1]
S. Chandra, E. Torlak, S. Barman, and R. Bodık. Angelic debugging. In ICSE, 2011.
[2]
E. M. Clarke, O. Grumberg, S. Jha, Y. Lu, and H. Veith. Counterexample-guided abstraction refinement. In CAV, 2000.
[3]
P. Cousot. Constructive design of a hierarchy of semantics of a transition system by abstract interpretation. Theor. Comput. Sci., 277(1--2), 2002.
[4]
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.
[5]
P. Cousot, R. Cousot, and F. Logozzo. A parametric segmentation functor for fully automatic and scalable array content analysis. In POPL, 2011.
[6]
P. Cousot, R. Cousot, and F. Logozzo. Precondition inference from intermittent assertions and application to contracts on collections. In VMCAI, 2011.
[7]
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.
[8]
I. Dillig, T. Dillig, and A. Aiken. Automated error diagnosis using abductive inference. In PLDI, 2012.
[9]
B. Elkarablieh, S. Khurshid, D. Vu, and K. S. McKinley. Starc: static analysis for efficient repair of complex data. In OOPSLA, 2007.
[10]
M. Fahndrich. Static verification for Code Contracts. In SAS, 2010.
[11]
M. Fahndrich and K. R. M. Leino. Declaring and checking non-null types in an object-oriented language. In ACM OOPSLA, 2003.
[12]
M. Fahndrich and F. Logozzo. Static contract checking with abstract interpretation. In FoVeOOS, 2010.
[13]
Eclipse Foundation. Eclipse.texttthttp://eclipse.org, 2011.
[14]
A. Griesmayer, R. Bloem, and B. Cook. Repair of boolean programs with an application to c. In CAV, 2006.
[15]
C. A. R. Hoare. An axiomatic basis for computer programming. Commun. ACM, 12(10), 1969.
[16]
B. Jobstmann, A. Griesmayer, and R. Bloem. Program repair as a game. In CAV, 2005.
[17]
M. Jose and R. Majumdar. Cause clue clauses: error localization using maximum satisfiability. In PLDI, 2011.
[18]
V. Laviron and F. Logozzo. Subpolyhedra: A (more) scalable approach to infer linear inequalities. In VMCAI, 2009.
[19]
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.
[20]
B. Liskov and J. M. Wing. A behavioral notion of subtyping. ACM Trans. Program. Lang. Syst., 16(6), 1994.
[21]
F. Logozzo, M. Barnett, P. Cousot, R. Cousot, and M. F\"ahndrich. A semantic integrated development environment. In OOPSLA Companion, 2012.
[22]
F. Logozzo and M. Fahndrich. Pentagons: a weakly relational abstract domain for the efficient validation of array accesses. In SAC, 2008.
[23]
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.
[24]
M. Martel. Program transformation for numerical precision. In PEPM, 2009.
[25]
B. Meyer. Applying "Design by Contract". IEEE Computer, 25(10):40--51, 1992.
[26]
Microsoft. Roslyn CTP. http://msdn.microsoft.com/en-us/roslyn, 2011.
[27]
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.
[28]
M. Pezzè, M. C. Rinard, W. Weimer, and A. Zeller. Self-repairing programs (Dagstuhl seminar 11062). Dagstuhl Reports, 1(2):16--29, 2011.
[29]
X. Rival. Understanding the origin of alarms in astrée. In SAS, 2005.
[30]
R. Samanta, J. V. Deshmukh, and E. A. Emerson. Automatic generation of local repairs for boolean programs. In FMCAD, 2008.
[31]
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.
[32]
N. Tillmann and J. de Halleux. Pex-white box test generation for .net. In TAP, 2008.
[33]
M. T. Vechev, E. Yahav, and G. Yorsh. Abstraction-guided synthesis of synchronization. In POPL, 2010.
[34]
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.
[35]
W. Weimer, T. Nguyen, C. Le Goues, and S. Forrest. Automatically finding patches using genetic programming. In ICSE, 2009.
[36]
M. W. Whalen, P. Godefroid, L. Mariani, A. Polini, N. Tillmann, and W. Visser. Fite: future integrated testing environment. In FoSER, 2010.

Cited By

View all
  • (2023)Patching Locking Bugs Statically with CrayonsACM Transactions on Software Engineering and Methodology10.1145/354868432:3(1-28)Online publication date: 26-Apr-2023
  • (2023)Sorald: Automatic Patch Suggestions for SonarQube Static Analysis ViolationsIEEE Transactions on Dependable and Secure Computing10.1109/TDSC.2022.316731620:4(2794-2810)Online publication date: 1-Jul-2023
  • (2023)Enabling Efficient Assertion Inference2023 IEEE 34th International Symposium on Software Reliability Engineering (ISSRE)10.1109/ISSRE59848.2023.00039(623-634)Online publication date: 9-Oct-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
OOPSLA '12: Proceedings of the ACM international conference on Object oriented programming systems languages and applications
October 2012
1052 pages
ISBN:9781450315616
DOI:10.1145/2384616
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 47, Issue 10
    OOPSLA '12
    October 2012
    1011 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2398857
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 19 October 2012

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. abstract interpretation
  2. design by contract
  3. program repair
  4. program transformation
  5. refactoring
  6. static analysis

Qualifiers

  • Research-article

Conference

SPLASH '12
Sponsor:

Acceptance Rates

Overall Acceptance Rate 268 of 1,244 submissions, 22%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)23
  • Downloads (Last 6 weeks)7
Reflects downloads up to 10 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Patching Locking Bugs Statically with CrayonsACM Transactions on Software Engineering and Methodology10.1145/354868432:3(1-28)Online publication date: 26-Apr-2023
  • (2023)Sorald: Automatic Patch Suggestions for SonarQube Static Analysis ViolationsIEEE Transactions on Dependable and Secure Computing10.1109/TDSC.2022.316731620:4(2794-2810)Online publication date: 1-Jul-2023
  • (2023)Enabling Efficient Assertion Inference2023 IEEE 34th International Symposium on Software Reliability Engineering (ISSRE)10.1109/ISSRE59848.2023.00039(623-634)Online publication date: 9-Oct-2023
  • (2023)SpecFuzzer: A Tool for Inferring Class Specifications via Grammar-Based Fuzzing2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)10.1109/ASE56229.2023.00024(2094-2097)Online publication date: 11-Sep-2023
  • (2023)Safety Enforcement via Programmable Strategies in MaudeJournal of Logical and Algebraic Methods in Programming10.1016/j.jlamp.2023.100849(100849)Online publication date: Jan-2023
  • (2022)Fuzzing class specificationsProceedings of the 44th International Conference on Software Engineering10.1145/3510003.3510120(1008-1020)Online publication date: 21-May-2022
  • (2022)CODIT: Code Editing With Tree-Based Neural ModelsIEEE Transactions on Software Engineering10.1109/TSE.2020.302050248:4(1385-1399)Online publication date: 1-Apr-2022
  • (2022)Automated repair of resource leaks in Android applicationsJournal of Systems and Software10.1016/j.jss.2022.111417192:COnline publication date: 1-Oct-2022
  • (2021)Concolic program repairProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3453483.3454051(390-405)Online publication date: 19-Jun-2021
  • (2019)Automated program repairCommunications of the ACM10.1145/331816262:12(56-65)Online publication date: 21-Nov-2019
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media