Inferring Loop Invariants by Mutation, Dynamic Analysis, and Static Checking

被引:19
|
作者
Galeotti, Juan P. [1 ]
Furia, Carlo A. [2 ]
May, Eva [3 ]
Fraser, Gordon [4 ]
Zeller, Andreas [1 ]
机构
[1] Univ Saarland, Dept Comp Sci, Chair Software Engn, D-66123 Saarbrucken, Germany
[2] Swiss Fed Inst Technol, Dept Comp Sci, Chair Software Engn, Zurich, Switzerland
[3] Google Inc, London, England
[4] Univ Sheffield, Dept Comp Sci, Sheffield S10 2TN, S Yorkshire, England
基金
欧洲研究理事会;
关键词
Loop invariants; inference; automatic verification; functional properties; dynamic analysis; PREDICATE ABSTRACTION; VERIFICATION; GENERATION; INFERENCE; PROGRAMS; LIBRARY;
D O I
10.1109/TSE.2015.2431688
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Verifiers that can prove programs correct against their full functional specification require, for programs with loops, additional annotations in the form of loop invariants-properties that hold for every iteration of a loop. We show that significant loop invariant candidates can be generated by systematically mutating postconditions; then, dynamic checking (based on automatically generated tests) weeds out invalid candidates, and static checking selects provably valid ones. We present a framework that automatically applies these techniques to support a program prover, paving the way for fully automatic verification without manually written loop invariants: Applied to 28 methods (including 39 different loops) from various java.util classes (occasionally modified to avoid using Java features not fully supported by the static checker), our DYNAMATE prototype automatically discharged 97 percent of all proof obligations, resulting in automatic complete correctness proofs of 25 out of the 28 methods-outperforming several state-of-the-art tools for fully automatic verification.
引用
收藏
页码:1019 / 1037
页数:19
相关论文
共 50 条
  • [1] Inferring Loop Invariants Using Postconditions
    Furia, Carlo Alberto
    Meyer, Bertrand
    FIELDS OF LOGIC AND COMPUTATION: ESSAYS DEDICATED TO YURI GUREVICH ON THE OCCASION OF HIS 70TH BIRTHDAY, 2010, 6300 : 277 - 300
  • [2] Inferring Loop Invariants through Gamification
    Bounov, Dimitar
    DeRossi, Anthony
    Menarini, Massimiliano
    Griswold, William G.
    Lerner, Sorin
    PROCEEDINGS OF THE 2018 CHI CONFERENCE ON HUMAN FACTORS IN COMPUTING SYSTEMS (CHI 2018), 2018,
  • [3] Metadata Invariants: Checking and Inferring Metadata Coding Conventions
    Song, Myoungkyu
    Tilevich, Eli
    2012 34TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2012, : 694 - 704
  • [4] A Modular Static Analysis Approach to Affine Loop Invariants Detection
    Ancourt, Corinne
    Coelho, Fabien
    Irigoin, Francois
    ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2010, 267 (01) : 3 - 16
  • [5] Inferring Loop Invariants for Multi-Path Loops
    Lin, Yingwen
    Zhang, Yao
    Chen, Sen
    Song, Fu
    Xie, Xiaofei
    Li, Xiaohong
    Sun, Lintan
    2021 INTERNATIONAL SYMPOSIUM ON THEORETICAL ASPECTS OF SOFTWARE ENGINEERING (TASE 2021), 2021, : 63 - 70
  • [6] Automatically inferring loop invariants via algorithmic learning
    Jung, Yungbum
    Kong, Soonho
    David, Cristina
    Wang, Bow-Yaw
    Yi, Kwangkeun
    MATHEMATICAL STRUCTURES IN COMPUTER SCIENCE, 2015, 25 (04) : 892 - 915
  • [7] Eliminating Static Analysis False Positives Using Loop Abstraction and Bounded Model Checking
    Chimdyalwar, Bharti
    Darke, Priyanka
    Chavda, Anooj
    Vaghani, Sagar
    Chauhan, Avriti
    FM 2015: FORMAL METHODS, 2015, 9109 : 573 - 576
  • [8] Automatically Inferring Quantified Loop Invariants by Algorithmic Learning from Simple Templates
    Kong, Soonho
    Jung, Yungbum
    David, Cristina
    Wang, Bow-Yaw
    Yi, Kwangkeun
    PROGRAMMING LANGUAGES AND SYSTEMS, 2010, 6461 : 328 - +
  • [9] Combining Static and Dynamic Contract Checking for Curry
    Hanus, Michael
    FUNDAMENTA INFORMATICAE, 2020, 173 (04) : 285 - 314
  • [10] A novel data-driven approach on inferring loop invariants for C programs
    Lu, Hong
    Wang, Huitao
    Gui, Jiacheng
    Chen, Panfeng
    Huang, Hao
    JOURNAL OF COMPUTER LANGUAGES, 2022, 71