Effective interactive proofs for higher-order imperative programs

A. Chlipala, G. Malecha, Greg Morrisett, Avraham Shinnar, Ryan Wisnesky
{"title":"Effective interactive proofs for higher-order imperative programs","authors":"A. Chlipala, G. Malecha, Greg Morrisett, Avraham Shinnar, Ryan Wisnesky","doi":"10.1145/1596550.1596565","DOIUrl":null,"url":null,"abstract":"We present a new approach for constructing and verifying higher-order, imperative programs using the Coq proof assistant. We build on the past work on the Ynot system, which is based on Hoare Type Theory. That original system was a proof of concept, where every program verification was accomplished via laborious manual proofs, with much code devoted to uninteresting low-level details. In this paper, we present a re-implementation of Ynot which makes it possible to implement fully-verified, higher-order imperative programs with reasonable proof burden. At the same time, our new system is implemented entirely in Coq source files, showcasing the versatility of that proof assistant as a platform for research on language design and verification. Both versions of the system have been evaluated with case studies in the verification of imperative data structures, such as hash tables with higher-order iterators. The verification burden in our new system is reduced by at least an order of magnitude compared to the old system, by replacing manual proof with automation. The core of the automation is a simplification procedure for implications in higher-order separation logic, with hooks that allow programmers to add domain-specific simplification rules.\n We argue for the effectiveness of our infrastructure by verifying a number of data structures and a packrat parser, and we compare to similar efforts within other projects. Compared to competing approaches to data structure verification, our system includes much less code that must be trusted; namely, about a hundred lines of Coq code defining a program logic. All of our theorems and decision procedures have or build machine-checkable correctness proofs from first principles, removing opportunities for tool bugs to create faulty verifications.","PeriodicalId":20504,"journal":{"name":"Proceedings of the 18th ACM SIGPLAN international conference on Functional programming","volume":"33 14","pages":"79-90"},"PeriodicalIF":0.0000,"publicationDate":"2009-08-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"104","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 18th ACM SIGPLAN international conference on Functional programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1596550.1596565","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 104

Abstract

We present a new approach for constructing and verifying higher-order, imperative programs using the Coq proof assistant. We build on the past work on the Ynot system, which is based on Hoare Type Theory. That original system was a proof of concept, where every program verification was accomplished via laborious manual proofs, with much code devoted to uninteresting low-level details. In this paper, we present a re-implementation of Ynot which makes it possible to implement fully-verified, higher-order imperative programs with reasonable proof burden. At the same time, our new system is implemented entirely in Coq source files, showcasing the versatility of that proof assistant as a platform for research on language design and verification. Both versions of the system have been evaluated with case studies in the verification of imperative data structures, such as hash tables with higher-order iterators. The verification burden in our new system is reduced by at least an order of magnitude compared to the old system, by replacing manual proof with automation. The core of the automation is a simplification procedure for implications in higher-order separation logic, with hooks that allow programmers to add domain-specific simplification rules. We argue for the effectiveness of our infrastructure by verifying a number of data structures and a packrat parser, and we compare to similar efforts within other projects. Compared to competing approaches to data structure verification, our system includes much less code that must be trusted; namely, about a hundred lines of Coq code defining a program logic. All of our theorems and decision procedures have or build machine-checkable correctness proofs from first principles, removing opportunities for tool bugs to create faulty verifications.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
高阶命令式程序的有效交互证明
我们提出了一种使用Coq证明助手来构造和验证高阶命令式程序的新方法。我们建立在过去基于Hoare类型理论的Ynot系统的基础上。最初的系统是一个概念证明,其中每个程序验证都是通过费力的手工证明完成的,许多代码用于无趣的低级细节。在本文中,我们提出了Ynot的一种重新实现,它使得实现具有合理证明负担的完全验证的高阶命令式程序成为可能。同时,我们的新系统完全在Coq源文件中实现,展示了该证明助手作为语言设计和验证研究平台的多功能性。这两个版本的系统都通过验证命令式数据结构的案例研究进行了评估,比如带有高阶迭代器的哈希表。通过用自动化取代人工证明,我们新系统中的验证负担与旧系统相比至少减少了一个数量级。自动化的核心是对高阶分离逻辑中的含义的简化过程,使用允许程序员添加特定于领域的简化规则的挂钩。我们通过验证大量数据结构和packrat解析器来论证我们的基础设施的有效性,并将其与其他项目中的类似工作进行比较。与数据结构验证的竞争方法相比,我们的系统包含的必须信任的代码要少得多;也就是说,大约一百行Coq代码定义了一个程序逻辑。我们所有的定理和决策过程都具有或构建了机器可检查的正确性证明,这些证明来自于第一原理,从而消除了工具错误产生错误验证的机会。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
1ML - core and modules united (F-ing first-class modules) Functional programming for dynamic and large data with self-adjusting computation A theory of gradual effect systems Building embedded systems with embedded DSLs Homotopical patch theory
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1