arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2205.00862cs.PL
收藏

利用经过验证的重写引擎加速经过验证的编译器开发

Accelerating Verified-Compiler Development with a Verified Rewriting Engine

Jason Gross, Andres Erbsen, Jade Philipoom, Rajashree Agrawal, Adam Chlipala

AI总结:

本文提出在 Coq 中实现基于代数重写规则的验证编译器框架,将已证明定理自动组合成带证明的快速编译器,并应用于 Fiat Cryptography 工具链,使生成的命令行编译器速度提升约 1000 倍且证明更简单。

摘要:

编译器是形式验证的主要目标,因为编译器错误会使更高层次的正确性保证失效,但如果编译器变更必须附带证明补丁,其实现可能会变得更加费力。一种有吸引力的方法是将编译器表示为一组代数重写规则,由通用引擎高效地应用这些规则。这样,每条重写规则都可以单独证明,无需为编译器的其他部分重新审视过去的证明。我们首次实现了这一思想,其形式是一个用于 Coq 证明助手的框架。我们新的 Coq 命令接收普通的已证明定理,并将其自动组合成带有证明的快速编译器。我们将该框架应用于改进 Fiat Cryptography 工具链,用于生成密码学算术,产出了一个提取出的命令行编译器,其速度大约快 1000 倍,同时实际上具有更简单的编译器特定证明。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑