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 条
  • [41] Security risk scenarios and solutions in automatic program repair
    Huang, Yuming
    Ma, Jianfeng
    Liu, Zhiquan
    Wei, Kaimin
    Feng, Bingwen
    Xi'an Dianzi Keji Daxue Xuebao/Journal of Xidian University, 2019, 46 (06): : 147 - 154
  • [42] Mining software repair models for reasoning on the search space of automated program fixing
    Martinez, Matias
    Monperrus, Martin
    EMPIRICAL SOFTWARE ENGINEERING, 2015, 20 (01) : 176 - 205
  • [43] Mining software repair models for reasoning on the search space of automated program fixing
    Matias Martinez
    Martin Monperrus
    Empirical Software Engineering, 2015, 20 : 176 - 205
  • [44] Collapsible Contracts: Fixing a Pathology of Gradual Typing
    Feltey, Daniel
    Greenman, Ben
    Scholliers, Christophe
    Findler, Robert Bruce
    St-Amour, Vincent
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2018, 2
  • [45] Repair and overhaul contracts
    不详
    AIRCRAFT ENGINEERING AND AEROSPACE TECHNOLOGY, 1997, 69 (05): : 498 - 499
  • [46] Code Similarity and Location-Awareness Automatic Program Repair
    Cao, Heling
    Han, Dong
    Liu, Fangzheng
    Liao, Tianli
    Zhao, Chenyang
    Shi, Jianshu
    APPLIED SCIENCES-BASEL, 2023, 13 (14):
  • [47] Automatic Program Repair Using Formal Verification and Expression Templates
    Nguyen, Thanh-Toan
    Ta, Quang-Trung
    Chin, Wei-Ngan
    VERIFICATION, MODEL CHECKING, AND ABSTRACT INTERPRETATION, VMCAI 2019, 2019, 11388 : 70 - 91
  • [48] Applying Token Tagging to Augment Dataset for Automatic Program Repair
    Hu, Huimin
    Lee, Byungjeong
    JOURNAL OF INFORMATION PROCESSING SYSTEMS, 2022, 18 (05): : 628 - 636
  • [49] A Comparative Study of Automatic Program Repair Techniques for Security Vulnerabilities
    Pinconschi, Eduard
    Abreu, Rui
    Adao, Pedro
    2021 IEEE 32ND INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING (ISSRE 2021), 2021, : 196 - 207
  • [50] A Study on the Impact of Reusing Redundant Patches on Automatic Program Repair
    Gao, Hang
    Ji, Tao
    Mao, Xiaoguang
    PROCEEDINGS OF 2018 IEEE 9TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING AND SERVICE SCIENCE (ICSESS), 2018, : 1058 - 1061