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

Laila El-Beheiry, Giselle Reis, Ammar Karkour
{"title":"SMLtoCoq: Automated Generation of Coq Specifications and Proof Obligations from SML Programs with Contracts","authors":"Laila El-Beheiry, Giselle Reis, Ammar Karkour","doi":"10.4204/EPTCS.337.6","DOIUrl":null,"url":null,"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.","PeriodicalId":262518,"journal":{"name":"International Workshop on Logical Frameworks and Meta-Languages: Theory and Practice","volume":"70 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-07-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Workshop on Logical Frameworks and Meta-Languages: Theory and Practice","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4204/EPTCS.337.6","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

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.
从带有契约的SML程序中自动生成Coq规范和证明义务
关于函数式程序的正式推理应该是直接而优雅的,然而,这通常不是理所当然的。在证明助手中进行推理需要在这些工具中“重新实现”代码,这远非微不足道。SMLtoCoq提供了将SML程序和函数契约自动转换为Coq的功能。程序被转换成Coq规范,函数契约被转换成定理,然后这些定理可以被正式证明。使用Equations插件和其他完善的Coq库,SMLtoCoq能够翻译包含部分函数、结构、函子、记录等的无副作用的SML程序。此外,我们提供了SML基库的许多部分的Coq版本,因此对这些库的调用几乎保持原样。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信