Accelerating Verified-Compiler Development with a Verified Rewriting Engine

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Gross, Jason, Erbsen, Andres, Philipoom, Jade, Agrawal, Rajashree, Chlipala, Adam
Format: Preprint
Veröffentlicht: 2022
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866913728401768448
author Gross, Jason
Erbsen, Andres
Philipoom, Jade
Agrawal, Rajashree
Chlipala, Adam
author_facet Gross, Jason
Erbsen, Andres
Philipoom, Jade
Agrawal, Rajashree
Chlipala, Adam
contents 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$\times$ faster while actually featuring simpler compiler-specific proofs.
format Preprint
id arxiv_https___arxiv_org_abs_2205_00862
institution arXiv
publishDate 2022
record_format arxiv
spellingShingle Accelerating Verified-Compiler Development with a Verified Rewriting Engine
Gross, Jason
Erbsen, Andres
Philipoom, Jade
Agrawal, Rajashree
Chlipala, Adam
Programming Languages
F.3.1; D.2.4; F.4.2; D.3.4
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$\times$ faster while actually featuring simpler compiler-specific proofs.
title Accelerating Verified-Compiler Development with a Verified Rewriting Engine
topic Programming Languages
F.3.1; D.2.4; F.4.2; D.3.4
url https://arxiv.org/abs/2205.00862