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 条
  • [11] Crafting a proof assistant
    Asperti, Andrea
    Coen, Claudio Sacerdoti
    Tassi, Enrico
    Zacchiroli, Stefano
    TYPES FOR PROOFS AND PROGRAMS, 2007, 4502 : 18 - +
  • [12] The Twelf Proof Assistant
    Schurmann, Carsten
    THEOREM PROVING IN HIGHER ORDER LOGICS, PROCEEDINGS, 2009, 5674 : 79 - 83
  • [13] A PROOF ASSISTANT FOR PSF
    MAUW, S
    VELTINK, GJ
    LECTURE NOTES IN COMPUTER SCIENCE, 1992, 575 : 158 - 168
  • [14] Authoring verified documents by interactive proof construction and verification in text-editors
    Dietrich, Dominik
    Schulz, Ewaryst
    Wagner, Marc
    INTELLIGENT COMPUTER MATHEMATICS, PROCEEDINGS, 2008, 5144 : 398 - 414
  • [15] On Exams with the Isabelle Proof Assistant
    Jacobsen, Frederik Krogsdal
    Villadsen, Jorgen
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2023, (375): : 63 - 76
  • [16] Students' Proof Assistant (SPA)
    Schlichtkrull, Anders
    Villadsen, Jorgen
    From, Andreas Halkjaer
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2019, (290): : 1 - 13
  • [17] A Proof Assistant for Alloy Specifications
    Ulbrich, Mattias
    Geilmann, Ulrich
    El Ghazi, Aboubakr Achraf
    Taghdiri, Mana
    TOOLS AND ALGORITHMS FOR THE CONSTRUCTION AND ANALYSIS OF SYSTEMS, TACAS 2012, 2012, 7214 : 422 - 436
  • [18] A proof assistant for mobile processes
    Du, XT
    Li, ZJ
    ADVANCED PARALLEL PROCESSING TECHNOLOGIES, PROCEEDINGS, 2003, 2834 : 204 - 214
  • [19] Proust: A Nano Proof Assistant
    Ragde, Prabhakar
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2016, (230): : 63 - 75
  • [20] An Interactive Medical Knowledge Assistant
    Czejdo, Bogdan D.
    Baszun, Mikolaj
    BEST PRACTICES FOR THE KNOWLEDGE SOCIETY: KNOWLEDGE, LEARNING, DEVELOPMENT AND TECHNOLOGY FOR ALL, 2009, 49 : 298 - +