当前位置: X-MOL 学术J. Funct. Program. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
The verified CakeML compiler backend
Journal of Functional Programming ( IF 1.1 ) Pub Date : 2019-02-04 , DOI: 10.1017/s0956796818000229
YONG KIAM TAN , MAGNUS O. MYREEN , RAMANA KUMAR , ANTHONY FOX , SCOTT OWENS , MICHAEL NORRISH

The CakeML compiler is, to the best of our knowledge, the most realistic verified compiler for a functional programming language to date. The architecture of the compiler, a sequence of intermediate languages through which high-level features are compiled away incrementally, enables verification of each compilation pass at an appropriate level of semantic detail. Parts of the compiler’s implementation resemble mainstream (unverified) compilers for strict functional languages, and it supports several important features and optimisations. These include efficient curried multi-argument functions, configurable data representations, efficient exceptions, register allocation, and more. The compiler produces machine code for five architectures: x86-64, ARMv6, ARMv8, MIPS-64, and RISC-V. The generated machine code contains the verified runtime system which includes a verified generational copying garbage collector and a verified arbitrary precision arithmetic (bignum) library. In this paper, we present the overall design of the compiler backend, including its 12 intermediate languages. We explain how the semantics and proofs fit together and provide detail on how the compiler has been bootstrapped inside the logic of a theorem prover. The entire development has been carried out within the HOL4 theorem prover.

中文翻译:

经过验证的 CakeML 编译器后端

据我们所知,CakeML 编译器是迄今为止针对函数式编程语言经过验证的最真实的编译器。编译器的体系结构是一系列中间语言,通过这些中间语言增量地编译掉高级特性,它可以在适当的语义细节级别上验证每个编译过程。编译器的部分实现类似于严格功能语言的主流(未经验证)编译器,它支持几个重要的特性和优化。其中包括高效的柯里化多参数函数、可配置的数据表示、高效的异常、寄存器分配等。该编译器为五种架构生成机器代码:x86-64、ARMv6、ARMv8、MIPS-64 和 RISC-V。生成的机器代码包含经过验证的运行时系统,其中包括经过验证的分代复制垃圾收集器和经过验证的任意精度算术 (bignum) 库。在本文中,我们介绍了编译器后端的总体设计,包括其 12 种中间语言。我们解释了语义和证明是如何结合在一起的,并提供了有关编译器如何在定理证明器的逻辑中引导的详细信息。整个开发是在 HOL4 定理证明器内进行的。我们解释了语义和证明是如何结合在一起的,并提供了有关编译器如何在定理证明器的逻辑中引导的详细信息。整个开发是在 HOL4 定理证明器内进行的。我们解释了语义和证明是如何结合在一起的,并提供了有关编译器如何在定理证明器的逻辑中引导的详细信息。整个开发是在 HOL4 定理证明器内进行的。
更新日期:2019-02-04
down
wechat
bug