A new verified compiler backend for CakeML
Journal article, 2016

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.

Author

Yong Kiam Tan

Institute of High Performance Computing, Singapore

Magnus Myreen

Formal methods

Ramana Kumar

Commonwealth Scientific and Industrial Research Organisation (CSIRO)

University of New South Wales (UNSW)

Anthony C. J. Fox

University of Cambridge

Scott Owens

University Of Kent

Michael Norrish

University of New South Wales (UNSW)

Commonwealth Scientific and Industrial Research Organisation (CSIRO)

ACM SIGPLAN Notices

1523-2867 (ISSN)

Vol. 51 9 60-73

Subject Categories

Information Science

Computer Science

Computer Systems

DOI

10.1145/2951913.2951924

More information

Latest update

1/23/2023