Automatic Program Repair by Fixing Contracts

被引:0
|
作者
Pei, Yu [1 ]
Furia, Carlo A. [1 ]
Nordio, Martin [1 ]
Meyer, Bertrand [1 ]
机构
[1] Swiss Fed Inst Technol, Chair Software Engn, Zurich, Switzerland
关键词
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
While most debugging techniques focus on patching implementations, there are bugs whose most appropriate corrections consist in fixing the specification to prevent invalid executions-such as to define the correct input domain of a function. In this paper, we present a fully automatic technique that fixes bugs by proposing changes to contracts (simple executable specification elements such as pre- and postconditions). The technique relies on dynamic analysis to understand the source of buggy behavior, to infer changes to the contracts that emend the bugs, and to validate the changes against general usage. We have implemented the technique in a tool called SpeciFix, which works on programs written in Eiffel, and evaluated it on 44 bugs found in standard data-structure libraries. Manual analysis by human programmers found that SpeciFix suggested repairs that are deployable for 25% of the faults; in most cases, these contract repairs were preferred over fixes for the same bugs that change the implementation.
引用
收藏
页码:246 / 260
页数:15
相关论文
共 50 条
  • [31] SMARTFIX: Fixing Vulnerable Smart Contracts by Accelerating Generate-and-Verify Repair using Statistical Models
    So, Sunbeom
    Oh, Hakjoo
    PROCEEDINGS OF THE 31ST ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2023, 2023, : 185 - 197
  • [32] Expanding Fix Patterns to Enable Automatic Program Repair
    Nowack, Vesna
    Bowes, David
    Counsell, Steve
    Hall, Tracy
    Haraldsson, Saemundur
    Winter, Emily
    Woodward, John
    2021 IEEE 32ND INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING (ISSRE 2021), 2021, : 12 - 23
  • [33] Leveraging Causal Inference for Explainable Automatic Program Repair
    Wang, Jianzong
    Si, Shijing
    Zhu, Zhitao
    Qu, Xiaoyang
    Hong, Zhenhou
    Xiao, Jing
    2022 INTERNATIONAL JOINT CONFERENCE ON NEURAL NETWORKS (IJCNN), 2022,
  • [34] PROPR: Property-Based Automatic Program Repair
    Gissurarson, Matthias Pall
    Applis, Leonhard
    Panichella, Annibale
    van Deursen, Arie
    Sands, David
    2022 ACM/IEEE 44TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2022), 2022, : 1768 - 1780
  • [35] DynaMoth: Dynamic Code Synthesis for Automatic Program Repair
    Durieux, Thomas
    Monperrus, Martin
    2016 IEEE/ACM 11TH INTERNATIONAL WORKSHOP IN AUTOMATION OF SOFTWARE TEST (AST), 2016, : 85 - 91
  • [36] Towards API-Specific Automatic Program Repair
    Nielebock, Sebastian
    PROCEEDINGS OF THE 2017 32ND IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE'17), 2017, : 1010 - 1013
  • [37] Automatic Software Merging using Automated Program Repair
    Xing, Xiaoqian
    Maruyama, Katsuhisa
    2019 IEEE 1ST INTERNATIONAL WORKSHOP ON INTELLIGENT BUG FIXING (IBF '19), 2019, : 11 - 16
  • [38] A comprehensive study of automatic program repair on the QuixBugs benchmark
    Ye, He
    Martinez, Matias
    Durieux, Thomas
    Monperrus, Martin
    JOURNAL OF SYSTEMS AND SOFTWARE, 2021, 171
  • [39] A Comprehensive Study of Automatic Program Repair on the QuixBugs Benchmark
    Ye, He
    Martinez, Matias
    Durieux, Thomas
    Monperrus, Martin
    2019 IEEE 1ST INTERNATIONAL WORKSHOP ON INTELLIGENT BUG FIXING (IBF '19), 2019, : 1 - 10
  • [40] Automatic Program Repair as Semantic Suggestions: An Empirical Study
    Campos, Diogo
    Restivo, Andre
    Ferreira, Hugo Sereno
    Ramos, Afonso
    2021 14TH IEEE CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION (ICST 2021), 2021, : 217 - 228