Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/3180155.3180247acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Semantic program repair using a reference implementation

Published: 27 May 2018 Publication History

Abstract

Automated program repair has been studied via the use of techniques involving search, semantic analysis and artificial intelligence. Most of these techniques rely on tests as the correctness criteria, which causes the test overfitting problem. Although various approaches such as learning from code corpus have been proposed to address this problem, they are unable to guarantee that the generated patches generalize beyond the given tests. This work studies automated repair of errors using a reference implementation. The reference implementation is symbolically analyzed to automatically infer a specification of the intended behavior. This specification is then used to synthesize a patch that enforces conditional equivalence of the patched and the reference programs. The use of the reference implementation as an implicit correctness criterion alleviates overfitting in test-based repair. Besides, since we generate patches by semantic analysis, the reference program may have a substantially different implementation from the patched program, which distinguishes our approach from existing techniques for regression repair like Relifix. Our experiments in repairing the embedded Linux Busybox with GNU Coreutils as reference (and vice-versa) revealed that the proposed approach scales to real-world programs and enables the generation of more correct patches.

References

[1]
Rajeev Alur, Rastislav Bodik, Eric Dallal, Dana Fisman, Pranav Garg, Garvit Juniwal, Hadas Kress-Gazit, P. Madhusudan, Milo M. K. Martin, Mukund Raghothaman, Shambwaditya Saha, Sanjit A. Seshia, Rishabh Singh, Armando Solar-Lezama, Emina Torlak, and Abhishek Udupa. 2015. Syntax-Guided Synthesis. In Dependable Software Systems Engineering. 1--25.
[2]
Earl T. Barr, Yuriy Brun, Premkumar T. Devanbu, Mark Harman, and Federica Sarro. 2014. The plastic surgery hypothesis. In FSE. ACM, 306--317.
[3]
Earl T. Barr, Mark Harman, Yue Jia, Alexandru Marginean, and Justyna Petke. 2015. Automated Software Transplantation. In ISSTA. ACM, New York, NY, USA, 257--269.
[4]
Cristian Cadar, Daniel Dunbar, Dawson R Engler, et al. 2008. KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs. In OSDI, Vol. 8. 209--224.
[5]
Satish Chandra, Emina Torlak, Shaon Barman, and Rastislav Bodík. 2011. Angelic debugging. In ICSE. 121--130.
[6]
Leonardo De Moura and Nikolaj Bjørner. 2008. Z3: An Efficient SMT Solver. In TACAS. Springer-Verlag, Berlin, Heidelberg, 337--340.
[7]
Thomas Durieux, Matias Martinez, Martin Monperrus, Romain Sommerard, and Jifeng Xuan. 2015. Automatic Repair of Real Bugs: An Experience Report on the Defects4J Dataset. CoRR abs/1505.07002 (2015).
[8]
Mark Harman, Yue Jia, and William B. Langdon. 2014. Babel Pidgin: SBSE Can Grow and Graft Entirely New Functionality into a Real World System. In SSBSE, Vol. 8636. Springer, 247--252.
[9]
James A Jones, Mary Jean Harrold, and John Stasko. 2002. Visualization of test information to assist fault localization. In ICSE. ACM, 467--477.
[10]
Ming Kawaguchi, Shuvendu Lahiri, and Henrique Rebelo. 2010. Conditional equivalence. Technical Report.
[11]
Yalin Ke, Kathryn T. Stolee, Claire Le Goues,and Yuriy Brun. 2015. Repairing Programs with Semantic Code Search. In ASE. IEEE Computer Society, 295--306.
[12]
James C. King. 1976. Symbolic Execution and Program Testing. Commun. ACM 19, 7 (1976), 385--394.
[13]
Shuvendu K. Lahiri, Chris Hawblitzel, Ming Kawaguchi, and Henrique Rebêlo. 2012. SYMDIFF: A Language-Agnostic Semantic Diff Tool for Imperative Programs. In CAV. 712--717.
[14]
Shuvendu K. Lahiri, Rohit Sinha, and Chris Hawblitzel. 2015. Automatic Rootcausing for Program Equivalence Failures in Binaries. In CAV. 362--379.
[15]
Xuan-Bach D. Le, Duc-Hiep Chu, David Lo, Claire Le Goues, and Willem Visser. 2017. JFIX: semantics-based repair of Java programs via symbolic PathFinder. In ISSTA. ACM, 376--379.
[16]
Claire Le Goues, Michael Dewey-Vogt, Stephanie Forrest, and WestleyWeimer. 2012. A Systematic Study ofAutomated Program Repair: Fixing 55 out of 105 Bugs for $8 Each. In ICSE. IEEE Press, 3--13.
[17]
Claire Le Goues, Neal Holtschulte, Edward K Smith, Yuriy Brun, Premkumar Devanbu, Stephanie Forrest, and Westley Weimer. 2015. The ManyBugs and IntroClass benchmarks for automated repair of C programs. TSE 41, 12 (2015), 1236--1256.
[18]
Claire Le Goues, ThanhVu Nguyen, Stephanie Forrest, and Westley Weimer. 2012. GenProg: A generic method for automatic software repair. IEEE TSE 38, 1 (2012), 54--72.
[19]
Rainer Leupers. 2013. Code optimization techniques for embedded processors: Methods, algorithms, and tools. Springer Science & Business Media.
[20]
Qing Li, Tatuya Jinmei, and Keiichi Shima. 2010. IPv6 Core Protocols Implementation. Morgan Kaufmann.
[21]
Fan Long and Martin Rinard. {n. d.}. Staged program repair with condition synthesis. In ESEC/FSE. ACM, 166--178.
[22]
Fan Long and Martin Rinard. 2016. Automatic patch generation by learning correct code. In POPL. ACM, 298--312.
[23]
Paul Dan Marinescu and Cristian Cadar. 2012. Make test-zesti: A symbolic execution solution for improving regression testing. In ICSE. IEEE Press, 716--726.
[24]
Matias Martinez and Martin Monperrus. 2015. Mining software repair models for reasoning on the search space of automated program fixing. Empirical Software Engineering 20, 1 (2015), 176--205.
[25]
Sergey Mechtaev, Jooyong Yi, and Abhik Roychoudhury. 2015. Directfix: Looking for simple program repairs. In ICSE. IEEE Press, 448--458.
[26]
Sergey Mechtaev, Jooyong Yi, and Abhik Roychoudhury. 2016. Angelix: Scalable Multiline Program Patch Synthesis via Symbolic Analysis. In ICSE. 691--701.
[27]
Hoang Duong Thien Nguyen, Dawei Qi, Abhik Roychoudhury, and Satish Chandra. 2013. SemFix: Program Repair via Semantic Analysis. In ICSE. IEEE Press, Piscataway, NJ, USA, 772--781.
[28]
Suzette Person, Matthew B. Dwyer, Sebastian G. Elbaum, and Corina S. Pasareanu. 2008. Differential symbolic execution. In FSE. 226--237.
[29]
Justyna Petke, Mark Harman, William B. Langdon, and Westley Weimer. 2014. Using Genetic Improvement and Code Transplants to Specialise a C+ + Program to a Problem Class. In EuroGP, Vol. 8599. Springer, 137--149.
[30]
Yuhua Qi, Xiaoguang Mao, Yan Lei, Ziying Dai, and Chengsong Wang. 2014. The strength of random search on automated program repair. In ICSE. ACM, 254--265.
[31]
Stelios Sidiroglou-Douskos, Eric Lahtinen, Anthony Eden, Fan Long, and Martin Rinard. 2017. CodeCarbonCopy. In ESEC/FSE. ACM, 95--105.
[32]
Stelios Sidiroglou-Douskos, Eric Lahtinen, Fan Long, and Martin Rinard. 2015. Automatic Error Elimination by Horizontal Code Transfer Across Multiple Applications. In PLDI. ACM, New York, NY, USA, 43--54.
[33]
Kathryn T. Stolee, Sebastian G. Elbaum, and Daniel Dobos. 2014. Solving the Search for Source Code. ACM Trans. Softw. Eng. Methodol. 23,3 (2014), 26:1--26:45.
[34]
Kathryn T. Stolee, Sebastian G. Elbaum, and Matthew B. Dwyer. 2016. Code search with input/output queries: Generalizing, ranking, and assessment. Journal of Systems and Software 116 (2016), 35--48.
[35]
Shin Hwei Tan and Abhik Roychoudhury. 2015. relifix: Automated repair of software regressions. In ICSE. IEEE Press, 471--482.
[36]
Shin Hwei Tan, Jooyong Yi, Sergey Mechtaev, Abhik Roychoudhury, et al. 2017. Codeflaws: a programming competition benchmark for evaluating automated program repair tools. In ICSE Companion. 180--182.
[37]
Shin Hwei Tan, Hiroaki Yoshida, Mukul R Prasad, and Abhik Roychoudhury. 2016. Anti-patterns in search-based program repair. In FSE. ACM, 727--738.
[38]
Nikolai Tillmann and Wolfram Schulte. 2005. Parameterized unit tests. In ACM SIGSOFT Software Engineering Notes, Vol. 30. ACM, 253--262.
[39]
Busybox Website. 2017. Busybox. https://busybox.net/. (2017).
[40]
GNU Coreutils Website. 2017. GNU Coreutils. https://www.gnu.org/software/coreutils/coreutils.html. (2017).
[41]
Westley Weimer, Zachary P. Fry, and Stephanie Forrest. 2013. Leveraging program equivalence for adaptive program repair: Models and first results. In ASE. IEEE, 356--366.
[42]
Westley Weimer, ThanhVu Nguyen, Claire Le Goues, and Stephanie Forrest. 2009. Automatically Finding Patches Using Genetic Programming. In ICSE. IEEE Computer Society, 364--374.
[43]
Qi Xin and Steven P Reiss. 2017. Identifying test-suite-overfitted patches through test case generation. In ISSTA. ACM, 226--236.
[44]
Yingfei Xiong, Jie Wang, Runfa Yan, Jiachen Zhang, Shi Han, Gang Huang, and Lu Zhang. 2017. Precise condition synthesis for program repair. In ICSE. IEEE / ACM, 416--426.
[45]
Jifeng Xuan, Matias Martinez, Favio Demarco, Maxime Clement, Sebastian R. Lamelas Marcote, Thomas Durieux, Daniel Le Berre, and Martin Monperrus. 2017. Nopol: Automatic Repair of Conditional Statement Bugs in Java Programs. IEEE TSE 43, 1 (2017), 34--55.
[46]
Jinqiu Yang, Alexey Zhikhartsev, Yuefei Liu, and Lin Tan. 2017. Better test cases for better automated program repair. In ESEC/FSE. ACM, 831--841.
[47]
Jooyong Yi, Shin Hwei Tan, Sergey Mechtaev, Marcel Boehme, and Abhik Roychoudhury. 2018. Correlation of Test-suite Metrics with Patch Quality in Program Repair. Empirical Software Engineering To appear (2018).
[48]
Andreas Zeller. 1999. Yesterday, My Program Worked. Today, It Does Not. Why?. In FSE. Springer-Verlag, London, UK, UK, 253--267.
[49]
Tianyi Zhang and Miryung Kim. 2017. Automated transplantation and differential testing for clones. In ICSE. IEEE / ACM, 665--676.

Cited By

View all
  • (2024)What IF is not enough? fixing null pointer dereference with contextual checkProceedings of the 33rd USENIX Conference on Security Symposium10.5555/3698900.3698977(1367-1382)Online publication date: 14-Aug-2024
  • (2024)Automated and Controlled Patch Generation for Enhanced Fixing of Communication Software VulnerabilitiesIntelligent and Converged Networks10.23919/ICN.2024.00165:3(222-236)Online publication date: Sep-2024
  • (2024)Patch Correctness Assessment: A SurveyACM Transactions on Software Engineering and Methodology10.1145/370297234:2(1-50)Online publication date: 8-Nov-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
ICSE '18: Proceedings of the 40th International Conference on Software Engineering
May 2018
1307 pages
ISBN:9781450356381
DOI:10.1145/3180155
  • Conference Chair:
  • Michel Chaudron,
  • General Chair:
  • Ivica Crnkovic,
  • Program Chairs:
  • Marsha Chechik,
  • Mark Harman
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: 27 May 2018

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. debugging
  2. program repair
  3. verification

Qualifiers

  • Research-article

Conference

ICSE '18
Sponsor:

Acceptance Rates

Overall Acceptance Rate 276 of 1,856 submissions, 15%

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)49
  • Downloads (Last 6 weeks)5
Reflects downloads up to 08 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2024)What IF is not enough? fixing null pointer dereference with contextual checkProceedings of the 33rd USENIX Conference on Security Symposium10.5555/3698900.3698977(1367-1382)Online publication date: 14-Aug-2024
  • (2024)Automated and Controlled Patch Generation for Enhanced Fixing of Communication Software VulnerabilitiesIntelligent and Converged Networks10.23919/ICN.2024.00165:3(222-236)Online publication date: Sep-2024
  • (2024)Patch Correctness Assessment: A SurveyACM Transactions on Software Engineering and Methodology10.1145/370297234:2(1-50)Online publication date: 8-Nov-2024
  • (2024)Evolving Paradigms in Automated Program Repair: Taxonomy, Challenges, and OpportunitiesACM Computing Surveys10.1145/369645057:2(1-43)Online publication date: 10-Oct-2024
  • (2024)BatFix: Repairing language model-based transpilationACM Transactions on Software Engineering and Methodology10.1145/365866833:6(1-29)Online publication date: 27-Jun-2024
  • (2024)PyDex: Repairing Bugs in Introductory Python Assignments using LLMsProceedings of the ACM on Programming Languages10.1145/36498508:OOPSLA1(1100-1124)Online publication date: 29-Apr-2024
  • (2024)Exploring Experiences with Automated Program Repair in PracticeProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639182(1-11)Online publication date: 20-May-2024
  • (2024)Automated Program Repair, What Is It Good For? Not Absolutely Nothing!Proceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639095(1-13)Online publication date: 20-May-2024
  • (2024)Concretely Mapped Symbolic Memory Locations for Memory Error DetectionIEEE Transactions on Software Engineering10.1109/TSE.2024.3395412(1-21)Online publication date: 2024
  • (2024)Accelerating Patch Validation for Program Repair With Interception-Based Execution SchedulingIEEE Transactions on Software Engineering10.1109/TSE.2024.335996950:3(618-635)Online publication date: 1-Mar-2024
  • 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