Automated Repair of Heap-Manipulating Programs Using Deductive Synthesis

被引:3
|
作者
Thanh-Toan Nguyen [1 ]
Quang-Trung Ta [1 ]
Sergey, Ilya [1 ,2 ]
Chin, Wei-Ngan [1 ]
机构
[1] Natl Univ Singapore, Sch Comp, Singapore, Singapore
[2] Yale NUS Coll, Singapore, Singapore
关键词
VERIFICATION; GENERATION; LANGUAGE;
D O I
10.1007/978-3-030-67067-2_17
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We propose a novel method to automatically repairing buggy heap-manipulating programs using constraint solving and deductive synthesis. Given an input program C and its formal specification in the form of a Hoare triple: {P} C {Q}, we use a separation-logic-based verifier to verify if program C is correct w.r.t. its specifications. If program C is found buggy, we then repair it in the following steps. First, we rely on the verification results to collect a list of suspicious statements of the buggy program. For each suspicious statement, we temporarily replace it with a template patch representing the desired statements. The template patch is also formally specified using a pair of unknown pre- and postcondition. Next, we use the verifier to analyze the temporarily patched program to collect constraints related to the pre- and postcondition of the template patch. Then, these constraints are solved by our constraint solving technique to discover the suitable specifications of the template patch. Subsequently, these specifications can be used to synthesize program statements of the template patch, consequently creating a candidate program. Finally, if the candidate program is validated, it is returned as the repaired program. We demonstrate the effectiveness of our approach by evaluating our implementation and a state-of-the-art approach on a benchmark of 231 buggy programs. The experimental results show that our tool successfully repairs 223 buggy programs and considerably outperforms the compared tool.
引用
收藏
页码:376 / 400
页数:25
相关论文
共 50 条
  • [1] Structuring the Synthesis of Heap-Manipulating Programs
    Polikarpova, Nadia
    Sergey, Ilya
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (POPL):
  • [2] Certifying the Synthesis of Heap-Manipulating Programs
    Watanabe, Yasunari
    Gopinathan, Kiran
    Pirlea, George
    Polikarpova, Nadia
    Sergey, Ilya
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2021, 5
  • [3] Structuring the Verification of Heap-Manipulating Programs
    Nanevski, Aleksandar
    Vafeiadis, Viktor
    Berdine, Josh
    ACM SIGPLAN NOTICES, 2010, 45 (01) : 261 - 273
  • [4] Structuring the Verification of Heap-Manipulating Programs
    Nanevski, Aleksandar
    Vafeiadis, Viktor
    Berdine, Josh
    POPL'10: PROCEEDINGS OF THE 37TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2010, : 261 - 273
  • [5] Automatic Numeric Abstractions for Heap-Manipulating Programs
    Magill, Stephen
    Tsai, Ming-Hsien
    Lee, Peter
    Tsay, Yih-Kuen
    POPL'10: PROCEEDINGS OF THE 37TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2010, : 211 - 222
  • [6] Model and Proof Generation for Heap-Manipulating Programs
    Brain, Martin
    David, Cristina
    Kroening, Daniel
    Schrammel, Peter
    PROGRAMMING LANGUAGES AND SYSTEMS, 2014, 8410 : 432 - 452
  • [7] Automatic Numeric Abstractions for Heap-Manipulating Programs
    Magill, Stephen
    Tsai, Ming-Hsien
    Lee, Peter
    Tsay, Yih-Kuen
    ACM SIGPLAN NOTICES, 2010, 45 (01) : 211 - 222
  • [8] Verifying heap-manipulating programs in an SMT framework
    Rakamaric, Zvonimir
    Bruttomesso, Roberto
    Hu, Alan J.
    Cimatti, Alessandro
    AUTOMATED TECHNOLOGY FOR VERIFICATION AND ANALYSIS, PROCEEDINGS, 2007, 4762 : 237 - +
  • [9] Automatic Assume/Guarantee Reasoning for Heap-Manipulating Programs
    Yorsh, Greta
    Skidanov, Alexey
    Reps, Thomas
    Sagiv, Mooly
    ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2005, 131 : 125 - 138
  • [10] Verifying Safety Properties of Concurrent Heap-Manipulating Programs
    Yahav, Eran
    Sagiv, Mooly
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2010, 32 (05):