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 type inferencer 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.
CITATION STYLE
Ho, S., Abrahamsson, O., Kumar, R., Myreen, M. O., Tan, Y. K., & Norrish, M. (2018). Proof-Producing Synthesis of CakeML with I/O and Local State from Monadic HOL Functions. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 10900 LNAI, pp. 646–662). Springer Verlag. https://doi.org/10.1007/978-3-319-94205-6_42
Mendeley helps you to discover research relevant for your work.