Verifying efficient function calls in CakeML
Scott Owens, Michael Norrish, Ramana Kumar et al. · Proceedings of the ACM on Programming Languages · 2017
We have designed an intermediate language (IL) for the CakeML compiler that supports the verified, efficient compilation of functions and calls. Verified compilation steps include batching of multiple curried arguments, detecting calls to statically known functions, and specialising calls to known functions with no free variables. Finally, we verify the translation to a lower-level IL that only supports closed, first-order functions. These compilation steps resemble those found in other compilers (especially OCaml). Our contribution here is the design of the semantics of the IL, and the demonstration that our verification techniques over this semantics work well in practice at this scale. The entire development was carried out in the HOL4 theorem prover.
Cited by 14 works. doi:10.1145/3110262 Open-access PDF
Authors
References
- Compiling with Continuations
- The essence of compiling with continuations
- A Formally Verified Compiler Back-end
- An indexed model of recursive types for foundational proof-carrying code
- CakeML
- A mechanically verified code generator
- Step-Indexed Syntactic Logical Relations for Recursive and Quantified Types
- Biorthogonality, step-indexing and compiler correctness
- A verified compiler for an impure functional language
- Functional Big-Step Semantics