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.
翻译:有关功能性程序的正式推理应该是直截了当的和优雅的,但通常不是理所当然的。证明助理的理由要求“执行”这些工具中的代码,这绝非微不足道。SMLtoCoq将SML程序和功能合同自动翻译成Coq。程序被翻译成Coq规格,功能性合同被翻译成Theorems,然后可以正式证明这一点。SMLtoCoq使用等式插件和其他有声的Coq图书馆,能够翻译SML程序,而没有包含部分功能、结构、真菌、记录等副作用。此外,我们提供了SML基础图书馆许多部分的 Coq版本,以便对这些图书馆的电话几乎保持原样。