Accelerating Verified-Compiler Development with a Verified Rewriting Engine

πŸ“… 2022-05-02
πŸ›οΈ International Conference on Interactive Theorem Proving
πŸ“ˆ Citations: 3
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
Formal verification of compilers incurs high maintenance costs, especially when modifications necessitate extensive re-verification. Method: This paper introduces the first trusted rewriting engine framework for Coq, modeling compilers as collections of algebraic rewrite rulesβ€”each independently verifiable. It employs theorem-driven modeling, metaprogramming-based automated synthesis, and proof reuse to enable rule-level formal verification and automatic composition. Contribution/Results: The framework decouples rule verification from compiler construction, significantly reducing verification and maintenance overhead. Evaluated in the Fiat Cryptography toolchain, the generated command-line compiler achieves approximately 1000Γ— speedup over prior verified counterparts. Moreover, its proofs are more concise and exhibit substantially higher reusability across compiler transformations.
πŸ“ Abstract
Compilers are a prime target for formal verification, since compiler bugs invalidate higher-level correctness guarantees, but compiler changes may become more labor-intensive to implement, if they must come with proof patches. One appealing approach is to present compilers as sets of algebraic rewrite rules, which a generic engine can apply efficiently. Now each rewrite rule can be proved separately, with no need to revisit past proofs for other parts of the compiler. We present the first realization of this idea, in the form of a framework for the Coq proof assistant. Our new Coq command takes normal proved theorems and combines them automatically into fast compilers with proofs. We applied our framework to improve the Fiat Cryptography toolchain for generating cryptographic arithmetic, producing an extracted command-line compiler that is about 1000 Γ— faster while actually featuring simpler compiler-specific proofs.
Problem

Research questions and friction points this paper is trying to address.

Simplify compiler verification process
Enable efficient compiler changes with proofs
Enhance cryptographic arithmetic generation speed
Innovation

Methods, ideas, or system contributions that make the work stand out.

Verified rewriting engine for compiler development
Coq framework automates compiler proof integration
Enhanced Fiat Cryptography toolchain performance
πŸ”Ž Similar Papers
No similar papers found.
Jason Gross
Jason Gross
Graduate, Massachusetts Institute of Technology
Artificial IntelligenceFormal Methods
Andres Erbsen
Andres Erbsen
CSAIL, Massachusetts Institute of Technology, Cambridge, MA, USA
J
Jade Philipoom
CSAIL, Massachusetts Institute of Technology, Cambridge, MA, USA; Google, London, UK
M
Miraya Poddar-Agrawal
A
A. Chlipala
CSAIL, Massachusetts Institute of Technology, Cambridge, MA, USA