Proof-Producing Synthesis of CakeML from Monadic HOL Functions
Open Access
- 6 June 2020
- journal article
- research article
- Published by Springer Nature in Journal of Automated Reasoning
- Vol. 64 (7) , 1287-1306
Abstract
We introduce an automatic method for producing stateful ML programs together with proofs of correctness from monadic functions in HOL. Our mechanism supports references, exceptions, and I/O operations, and can generate functions manipulating local state, which can then be encapsulated for use in a pure context. We apply this approach to several non-trivial examples, including the instruction encoder and register allocator of the otherwise pure CakeML compiler, which now benefits from better runtime performance. This development has been carried out in the HOL4 theorem prover.Keywords
Funding Information
- UK Research Institute in Verified Trustworthy Software Systems
- A*STAR National Science Scholarship (PhD), Singapore
- Swedish Foundation for Strategic Research
This publication has 15 references indexed in Scilit:
- Œuf: minimizing the Coq extraction TCB2018
- Verified Characteristic Formulae for CakeML2017
- Self-Formalisation of Higher-Order LogicJournal of Automated Reasoning, 2016
- Functional Big-Step Semantics2016
- Refinement to Imperative/HOL2015
- Proof-producing translation of higher-order logic into pure and stateful MLJournal of Functional Programming, 2014
- The OpenTheory Standard Theory LibraryLecture Notes in Computer Science, 2011
- Formal Verification of Coalescing Graph-Coloring Register AllocationLecture Notes in Computer Science, 2010
- Imperative Functional Programming with Isabelle/HOL2008
- Lazy functional state threadsACM SIGPLAN Notices, 1994