SMLtoCoq: Automated Generation of Coq Specifications and Proof Obligations from SML Programs with Contracts
Laila El-Beheiry (Carnegie Mellon University), Giselle Reis (Carnegie, Mellon University), Ammar Karkour (Carnegie Mellon University)

TL;DR
SMLtoCoq automates the translation of SML programs and contracts into Coq, enabling formal verification without manual reimplementation, covering complex language features and library calls.
Contribution
It introduces an automatic translation tool from SML to Coq that handles advanced language features and library calls, facilitating formal reasoning.
Findings
Successfully translates SML programs with complex features into Coq
Enables formal proofs of function contracts automatically
Maintains compatibility with SML's basis library in Coq
Abstract
Formally reasoning about functional programs is supposed to be straightforward and elegant, however, it is not typically done as a matter of course. Reasoning in a proof assistant requires "reimplementing" the code in those tools, which is far from trivial. SMLtoCoq provides an automatic translation of SML programs and function contracts into Coq. Programs are translated into Coq specifications, and function contracts into theorems, which can then be formally proved. Using the Equations plugin and other well established Coq libraries, SMLtoCoq is able to translate SML programs without side-effects containing partial functions, structures, functors, records, among others. Additionally, we provide a Coq version of many parts of SML's basis library, so that calls to these libraries are kept almost as is.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Formal Methods in Verification · Software Engineering Research
