A new verified compiler backend for CakeML
Open Access
- 4 September 2016
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 60-73
Abstract
We have developed and mechanically verified a new compiler backend for CakeML. Our new compiler features a sequence of intermediate languages that allows it to incrementally compile away high-level features and enables verification at the right levels of semantic detail. In this way, it resembles mainstream (unverified) compilers for strict functional languages. The compiler supports efficient curried multi-argument functions, configurable data representations, exceptions that unwind the call stack, register allocation, and more. The compiler targets several architectures: x86-64, ARMv6, ARMv8, MIPS-64, and RISC-V. In this paper, we present the overall structure of the compiler, including its 12 intermediate languages, and explain how everything fits together. We focus particularly on the interaction between the verification of the register allocator and the garbage collector, and memory representations. The entire development has been carried out within the HOL4 theorem prover.Keywords
This publication has 20 references indexed in Scilit:
- Pilsner: a compositionally verified compiler for a higher-order imperative language2015
- Relaxing safely: verified on-the-fly garbage collection for x86-TSO2015
- Verifying Fast and Sparse SSA-Based Optimizations in Coq2015
- End-to-end verification of stack-space bounds for C programsACM SIGPLAN Notices, 2014
- Formal Verification of an SSA-Based Middle-End for CompCertACM Transactions on Programming Languages and Systems, 2014
- A verified compiler for an impure functional languageACM SIGPLAN Notices, 2010
- Formal Verification of Coalescing Graph-Coloring Register AllocationLecture Notes in Computer Science, 2010
- A Formally Verified Compiler Back-endJournal of Automated Reasoning, 2009
- Tilting at Windmills with Coq: Formal Verification of a Compilation Algorithm for Parallel MovesJournal of Automated Reasoning, 2008
- Iterated register coalescingACM Transactions on Programming Languages and Systems, 1996