Automatic Program Repair Using Formal Verification and Expression Templates

被引:10
|
作者
Nguyen, Thanh-Toan [1 ]
Ta, Quang-Trung [1 ]
Chin, Wei-Ngan [1 ]
机构
[1] Natl Univ Singapore, Sch Comp, Singapore, Singapore
关键词
D O I
10.1007/978-3-030-11245-5_4
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present an automated approach to repair programs using formal verification and expression templates. In our approach, an input program is first verified against its formal specification to discover potentially buggy statements. For each of these statements, we identify the expression that needs to be repaired and set up a template patch which is a linear expression composed of the program's variables and unknown coefficients. Then, we analyze the template-patched program against the original specification to collect a set of constraints of the template patch. This constraint set will be solved by a constraint solving technique using Farkas' lemma to identify the unknown coefficients, consequently discovering the actual patch. We implement our approach in a tool called Maple and evaluate it with various buggy programs from a widely used benchmark TCAS, and a synthetic yet challenging benchmark containing recursive programs. Our tool can quickly discover the correct patches and outperforms the state-of-the-art program repair tools.
引用
收藏
页码:70 / 91
页数:22
相关论文
共 50 条
  • [21] Formal Specification and Automatic Verification of Conditional Commitments
    El Kholy, Warda
    El Menshawy, Mohamed
    Bentahar, Jamal
    Qu, Hongyang
    Dssouli, Rachida
    [J]. IEEE INTELLIGENT SYSTEMS, 2015, 30 (02) : 36 - 44
  • [22] UML Automatic Verification Tool with Formal Methods
    Beato, Ma Encarnacion
    Barrio-Solorzano, Manuel
    Cuesta, Carlos E.
    de la Fuente, Pablo
    [J]. ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2005, 127 (04) : 3 - 16
  • [23] Automatic Formal Verification of Software: Fundamental Concepts
    Hu, Alan J.
    [J]. 2009 INTERNATIONAL CONFERENCE ON COMMUNICATIONS, CIRCUITS AND SYSTEMS PROCEEDINGS, VOLUMES I & II: COMMUNICATIONS, NETWORKS AND SIGNAL PROCESSING, VOL I/ELECTRONIC DEVICES, CIRUITS AND SYSTEMS, VOL II, 2009, : 1155 - 1159
  • [24] A Methodology for Automatic Formal Verification of Enterprise Architecture
    Babkin, Eduard
    Malyzhenkov, Pavel
    Ivanova, Marina
    Ponomarev, Nikita
    [J]. INTERNATIONAL JOURNAL OF INFORMATION SYSTEM MODELING AND DESIGN, 2019, 10 (01) : 1 - 19
  • [25] Automatic Software Merging using Automated Program Repair
    Xing, Xiaoqian
    Maruyama, Katsuhisa
    [J]. 2019 IEEE 1ST INTERNATIONAL WORKSHOP ON INTELLIGENT BUG FIXING (IBF '19), 2019, : 11 - 16
  • [26] Automatic construction and verification algorithm for smart contracts based on formal verification
    Xie, Rui
    Zhong, Xuejiao
    Chen, Xin
    Xu, Shaohui
    Yu, Haiyang
    Guo, Xinyuan
    [J]. AIP Advances, 2024, 14 (11)
  • [27] Confix: Combining node-level fix templates and masked language model for automatic program repair
    Xiao, Jianmao
    Xu, Zhipeng
    Chen, Shiping
    Lei, Gang
    Fan, Guodong
    Cao, Yuanlong
    Deng, Shuiguang
    Feng, Zhiyong
    [J]. JOURNAL OF SYSTEMS AND SOFTWARE, 2024, 216
  • [28] Integrating tools for automatic program verification
    Hubbers, E
    [J]. PERSPECTIVES OF SYSTEM INFORMATICS, 2003, 2890 : 214 - 221
  • [29] Formal verification of SystemC by automatic hardware/software partitioning
    Kroening, D
    Sharygina, N
    [J]. THIRD ACM & IEEE INTERNATIONAL CONFERENCE ON FORMAL METHODS AND MODELS FOR CO-DESIGN, PROCEEDINGS, 2005, : 101 - 110
  • [30] Automatic Property Generation for the Formal Verification of Bus Bridges
    Soeken, Mathias
    Kuehne, Ulrich
    Freibothe, Martin
    Fey, Goerschwin
    Drechsler, Rolf
    [J]. 2011 IEEE 14TH INTERNATIONAL SYMPOSIUM ON DESIGN AND DIAGNOSTICS OF ELECTRONIC CIRCUITS AND SYSTEMS (DDECS), 2011, : 417 - 422