arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2107.07664cs.LOcs.PL
收藏

SMLtoCoq:从带有合同的SML程序自动生成Coq规范和证明义务

SMLtoCoq: Automated Generation of Coq Specifications and Proof Obligations from SML Programs with Contracts

Laila El-Beheiry, Giselle Reis, Ammar Karkour

摘要:

函数式程序的形式化推理应该是直接和优雅的,然而,它通常不是理所当然的。在证明助手中进行推理需要在那些工具中“重新实现”代码,这远非小事一桩。SMLtoCoq提供SML程序和函数契约到Coq的自动翻译。程序被翻译成Coq规范,函数合同成定理,然后可以正式证明。使用Equations插件和其他成熟的Coq库,SMLtoCoq能够翻译SML程序,而不会产生包含部分函数,结构,函子,记录等的副作用。此外,我们提供了SML基础库的许多部分的Coq版本,因此对这些库的调用几乎保持原样。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑