Live Verification in an Interactive Proof Assistant

被引:0
|
作者
Gruetter, Samuel [1 ]
Fukala, Viktor [1 ]
Chlipala, Adam [1 ]
机构
[1] MIT, Cambridge, MA 02139 USA
基金
美国国家科学基金会;
关键词
software verification; symbolic execution; interactive proof assistants;
D O I
10.1145/3656439
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present a prototype for a tool that enables programmers to verify their code as they write it in real-time. After each line of code that the programmer writes, the tool tells the programmer whether it was able to prove absence of undefined behavior so far, and it displays a concise representation of the symbolic state of the program right after the added line. The user can then either write the next line of code, or if needed or desired, write a specially marked comment that provides hints on how to solve side conditions or on how to represent the symbolic state more nicely. Once the programmer has finished writing the program, it is already verified with a mathematical correctness proof. Other tools providing real-time feedback already exist, but ours is the first one that only relies on a small trusted proof checker and that provides a concise summary of the symbolic state at the point in the program currently being edited, as opposed to only indicating whether user-stated assertions or postconditions hold. Program verification requires loop invariants, which are hard to find and tedious to spell out. We explore a middle ground in the design space between the two extremes of requiring users to spell out loop invariants manually and attempting to infer loop invariants automatically: Since a loop invariant often looks quite similar to the symbolic state right before the loop, our tool asks the user to express the desired loop invariant as a diff from the symbolic state before the loop, which has the potential to lead to shorter, more maintainable proofs. We prototyped our technique in the interactive proof assistant Coq, so our framework creates machine-checked proofs that the developed functions satisfy their specifications when executed according to the formal semantics of the source language. Using a verified compiler proven against the same source-language semantics, we can ensure that the behavior of the compiled program matches the program's behavior as represented by the framework during the proof. Additionally, since our polyglot source files can be viewed as Coq or C files at the same time, users willing to accept a larger trusted code base can compile them with GCC.
引用
收藏
页数:24
相关论文
共 50 条
  • [1] Towards Verification of Hybrid Systems in a Foundational Proof Assistant
    Ricketts, Daniel
    Malecha, Gregory
    Alvarez, Mario M.
    Gowda, Vignesh
    Lerner, Sorin
    2015 ACM/IEEE INTERNATIONAL CONFERENCE ON FORMAL METHODS AND MODELS FOR CODESIGN (MEMOCODE), 2015, : 248 - 257
  • [2] Introduction to PAF!, a proof assistant for ML programs verification
    Baro, S
    TYPES FOR PROOFS AND PROGRAMS, 2004, 3085 : 51 - 65
  • [3] The Interactive Verification Debugger: Effective Understanding of Interactive Proof Attempts
    Hentschel, Martin
    Haehnle, Reiner
    Bubel, Richard
    2016 31ST IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2016, : 846 - 851
  • [4] Graphical theories of interactive systems: Can a proof assistant help?
    Milner, R
    THEOREM PROVING IN HIGHER ORDER LOGICS, PROCEEDINGS, 2000, 1869 : 442 - 442
  • [5] Verification of Content-Centric Networking Using Proof Assistant
    Moriguchi, Sosuke
    Morishima, Takashi
    Goto, Mizuki
    Takahashi, Kazuko
    IEICE TRANSACTIONS ON COMMUNICATIONS, 2016, E99B (11) : 2297 - 2304
  • [6] Interactive Proof Assistant Based on Resolution Method in First Order Logic
    Bekiaris, Benjamin
    Perhac, Jan
    28TH INTERNATIONAL CONFERENCE ON INTELLIGENT ENGINEERING SYSTEMS, INES 2024, 2024, : 167 - 174
  • [7] A Combination of a Dynamic Geometry Software With a Proof Assistant for Interactive Formal Proofs
    Tuan Minh Pham
    Bertot, Yves
    ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2012, 285 : 43 - 55
  • [8] Experiences with software specification and verification using LP the Larch proof assistant
    Broy, M
    FORMAL METHODS IN SYSTEM DESIGN, 1996, 8 (03) : 221 - 272
  • [9] A Method of Internet Information Verification Based on Interactive Proof
    Liu, Yang
    Yang, Xiaohua
    Yu, Ying
    Xu, Lingyu
    2017 17TH IEEE INTERNATIONAL CONFERENCE ON COMMUNICATION TECHNOLOGY (ICCT 2017), 2017, : 1002 - 1006
  • [10] Design of a proof assistant
    Huet, G
    REWRITING TECHNIQUES AND APPLICATIONS, 1996, 1103 : 153 - 153