Formal verification using proof assistants, such as Coq, is an effective way of improving software quality, but requires significant effort and expertise. Machine learning can automatically synthesize proofs, but such tools are able to prove only a fraction of desired software properties. We introduce Cobblestone, a divide-and-conquer approach for proof synthesis. Cobblestone uses a large language model (LLM) to generate potential proofs, uses those proofs to break the problem into simpler parts, automatically identifies which of those parts were successfully proven, and iterates on the remaining parts to build a correct proof that is guaranteed to be sound, despite the reliance on unsound LLMs. We evaluate Cobblestone on four benchmarks of open-source Coq projects, controlling for training data leakage. Fully automatically, Cobblestone outperforms state-of-the-art non-LLM tools, and proves many theorems that other LLM-based tools cannot, and on many benchmarks, outperforms them. Each Cobblestone run costs only $1.25 and takes 14.7 minutes, on average. Cobblestone can also be used with external input, from a user or another tool, providing a proof structure or relevant lemmas. Evaluated with such an oracle, Cobblestone proves up to 58% of theorems. Overall, our research shows that tools can make use of partial progress and external input to more effectively automate formal verification.


翻译:使用证明助手(如Coq)进行形式验证是提升软件质量的有效手段,但需要大量专业知识和人力投入。机器学习技术可自动合成证明,然而现有工具仅能证明少数软件属性。我们提出Cobblestone——一种面向证明合成的分治方法。该方法利用大语言模型(LLM)生成候选证明,并基于这些证明将问题分解为更简单的子问题;通过自动识别已成功证明的子问题,并对剩余部分迭代优化,最终构建出具有正确性保证的可靠证明——即便依赖于可能产生错误结果的LLM。我们在四个开源Coq项目的基准测试中评估了Cobblestone,并有效控制了训练数据泄露风险。在完全自动化场景下,Cobblestone的性能超越了现有非LLM工具,能证明其他基于LLM的工具无法证明的众多定理,且在多个基准测试中表现更优。每次运行平均仅需1.25美元、耗时14.7分钟。此外,Cobblestone可集成用户或其他工具的外部输入,提供证明结构或相关引理。在接入此类预言机后,Cobblestone的定理证明成功率可达58%。总体而言,本研究表明通过利用局部进展和外部输入,工具能更有效地实现形式验证自动化。

0
下载
关闭预览

相关内容

八个不容错过的 GitHub Copilot 功能!
CSDN
11+阅读 · 2022年9月22日
智能合约的形式化验证方法研究综述
专知
16+阅读 · 2021年5月8日
重磅发布:基于 PyTorch 的深度文本匹配工具 MatchZoo-py
中国科学院网络数据重点实验室
16+阅读 · 2019年8月26日
NetworkMiner - 网络取证分析工具
黑白之道
16+阅读 · 2018年6月29日
推荐|caffe-orc主流ocr算法:CNN+BLSTM+CTC架构实现!
全球人工智能
19+阅读 · 2017年10月29日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
美国从乌克兰无人机战争中学习经验
专知会员服务
6+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
2+阅读 · 6月21日
学习数据的几何:形状空间分析数学综述
专知会员服务
9+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
11+阅读 · 6月17日
相关VIP内容
相关基金
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员