Accelerating Verified-Compiler Development with a Verified Rewriting Engine [article]

Jason Gross and Andres Erbsen and Jade Philipoom and Miraya Poddar-Agrawal and Adam Chlipala
2022 arXiv   pre-print
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
more » ... ation 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.
arXiv:2205.00862v2 fatcat:wzu43zd35zffjfu4akpuwsrqky