skip to main content
OSTI.GOV title logo U.S. Department of Energy
Office of Scientific and Technical Information

Title: A Formalization of Core Why3 in Coq

Journal Article · · Proceedings of the ACM on Programming Languages
DOI:https://doi.org/10.1145/3632902· OSTI ID:2311377

Intermediate verification languages like Why3 and Boogie have made it much easier to build program verifiers, transforming the process into a logic compilation problem rather than a proof automation one. Why3 in particular implements a rich logic for program specification with polymorphism, algebraic data types, recursive functions and predicates, and inductive predicates; it translates this logic to over a dozen solvers and proof assistants. Accordingly, it serves as a backend for many tools, including Frama-C, EasyCrypt, and GNATProve for Ada SPARK. But how can we be sure that these tools are correct? The alternate foundational approach, taken by tools like VST and CakeML, provides strong guarantees by implementing the entire toolchain in a proof assistant, but these tools are harder to build and cannot directly take advantage of SMT solver automation. As a first step toward enabling automated tools with similar foundational guarantees, we give a formal semantics in Coq for the logic fragment of Why3. We show that our semantics are useful by giving a correct-by-construction natural deduction proof system for this logic, using this proof system to verify parts of Why3's standard library, and proving sound two of Why3's transformations used to convert terms and formulas into the simpler logics supported by the backend solvers.

Research Organization:
Sandia National Lab. (SNL-CA), Livermore, CA (United States)
Sponsoring Organization:
USDOE National Nuclear Security Administration (NNSA), Office of Defense Programs (DP)
Grant/Contract Number:
NA0003525
OSTI ID:
2311377
Report Number(s):
SAND-2024-00054J
Journal Information:
Proceedings of the ACM on Programming Languages, Vol. 8, Issue POPL; ISSN 2475-1421
Publisher:
Association for Computing Machinery (ACM)Copyright Statement
Country of Publication:
United States
Language:
English

References (36)

SMTCoq: A Plug-In for Integrating SMT Solvers into Coq book January 2017
Essential Incompleteness of Arithmetic Verified by Coq book January 2005
The Trusted Computing Base of the CompCert Verified Compiler book March 2022
A machine-checked soundness proof for an efficient verification condition generator conference March 2010
An Automated Deductive Verification Framework for Circuit-building Quantum Programs book March 2021
Featherweight VeriFast journal September 2015
Why3-do: The Way of Harmonious Distributed System Proofs book March 2022
The MetaCoq Project journal February 2020
Dafny: An Automatic Program Verifier for Functional Correctness book January 2010
Candle: A Verified Implementation of HOL Light journal August 2022
CakeML conference January 2014
Constructive Mathematics and Computer Programming book January 1982
Isabelle’s Metalogic: Formalization and Proof Checker book July 2021
RefinedC: automating the foundational verification of C code with refined ownership types
  • Sammler, Michael; Lepigre, Rodolphe; Krebbers, Robbert
  • Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation https://doi.org/10.1145/3453483.3454036
conference June 2021
Boogie: A Modular Reusable Verifier for Object-Oriented Programs book January 2006
A verified VCGen based on dynamic logic: An exercise in meta-verification with Why3 journal June 2023
A Certified Multi-prover Verification Condition Generator book January 2012
Completeness Theorems for First-Order Logic Analysed in Constructive Type Theory book December 2019
VeriFast: A Powerful, Sound, Predictable, Fast Verifier for C and Java book January 2011
Cameleer: A Deductive Verification Tool for OCaml book July 2021
Why3 — Where Programs Meet Provers book January 2013
Program Logics for Certified Compilers book August 2014
Frama-C book January 2012
Formal verification of a realistic compiler journal July 2009
POPL Artifact for "A Formalization of Core Why3 in Coq" journal October 2023
One Logic to Use Them All book January 2013
CREUSOT: A Foundry for the Deductive Verification of Rust Programs book October 2022
Iris from the ground up: A modular foundation for higher-order concurrent separation logic journal January 2018
Computer-Aided Security Proofs for the Working Cryptographer book January 2011
Equations reloaded: high-level dependently-typed functional programming and proving in Coq journal July 2019
VST-A: A Foundationally Sound Annotation Verifier journal January 2024
Towards a Formally Verified Proof Assistant book January 2014
A Framework for Proof-carrying Logical Transformations journal July 2021
Automatic synthesis of typed Λ-programs on term algebras journal January 1985
Integration verification across software and hardware for a simple embedded system
  • Erbsen, Andres; Gruetter, Samuel; Choi, Joonwon
  • Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation https://doi.org/10.1145/3453483.3454065
conference June 2021
Formally Validating a Practical Verification Condition Generator book July 2021