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 条
  • [1] FORMAL PROGRAM VERIFICATION USING SYMBOLIC EXECUTION
    DANNENBERG, RB
    ERNST, GW
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1982, 8 (01) : 43 - 52
  • [2] Program Verification using Templates over Predicate Abstraction
    Srivastava, Saurabh
    Gulwani, Sumit
    [J]. PLDI'09 PROCEEDINGS OF THE 2009 ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION, 2009, : 223 - 234
  • [3] Program Verification using Templates over Predicate Abstraction
    Srivastava, Saurabh
    Gulwani, Sumit
    [J]. ACM SIGPLAN NOTICES, 2009, 44 (06) : 223 - 234
  • [4] ALGORITHM FOR FORMAL VERIFICATION OF BUSINESS PROCESS TEMPLATES
    Varosyan, A. S.
    [J]. CYBERNETICS AND SYSTEMS ANALYSIS, 2011, 47 (02) : 228 - 240
  • [5] Program verification using automatic generation of invariants
    Rodríguez-Carbonell, E
    Kapur, D
    [J]. THEORETICAL ASPECTS OF COMPUTING - ICTAC 2004, 2005, 3407 : 325 - 340
  • [6] Formal verification for C program
    Qian, Junyan
    Xu, Baowen
    [J]. INFORMATICA, 2007, 18 (02) : 289 - 304
  • [7] Automatic Formal Verification of Reconfigurable DSPs
    Velev, Miroslav N.
    Gao, Ping
    [J]. 2011 16TH ASIA AND SOUTH PACIFIC DESIGN AUTOMATION CONFERENCE (ASP-DAC), 2011,
  • [8] Establishment of personalized templates for automatic signature verification
    Schmidt, C
    Kraiss, KF
    [J]. PROCEEDINGS OF THE FOURTH INTERNATIONAL CONFERENCE ON DOCUMENT ANALYSIS AND RECOGNITION, VOLS 1 AND 2, 1997, : 263 - 267
  • [9] Automatic formal verification of DSP software
    Currie, DW
    Hu, AJ
    Rajan, S
    Fujita, M
    [J]. 37TH DESIGN AUTOMATION CONFERENCE, PROCEEDINGS 2000, 2000, : 130 - 135
  • [10] Formal automatic verification of security protocols
    Xiao, Meihua
    Xue, Jinyun
    [J]. 2006 IEEE INTERNATIONAL CONFERENCE ON GRANULAR COMPUTING, 2006, : 566 - +