arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.08467cs.SEcs.AIcs.LGcs.PL
收藏

DafnyBench:一个用于形式化软件验证的基准

DafnyBench: A Benchmark for Formal Software Verification

Harvard College(哈佛学院);Massachusetts Institute of Technology(麻省理工学院);Northeastern University(东北大学);Stanford University(斯坦福大学);University of California Irvine(加州大学欧文分校);Harvard University(哈佛大学)

Chloe Loughridge, Qinyi Sun, Seth Ahrenbach, Federico Cassano, Chuyue Sun, Ying Sheng, Anish Mudide, Md Rakib Hossain Misu, Nada Amin, Max Tegmark

AI总结:

本文提出最大的形式化软件验证基准 DafnyBench,评估 LLM 为 Dafny 自动生成验证提示的能力,并给出成功率及反馈重试、代码规模影响等基线结果。

摘要:

我们推出 DafnyBench,这是同类中最大的基准,用于训练和评估面向形式化软件验证的机器学习系统。我们测试了 GPT-4 和 Claude 3 等 LLM 自动生成足够提示的能力,以使 Dafny 形式化验证引擎能够成功验证超过 750 个程序,这些程序包含约 53,000 行代码。最佳模型和提示方案达到了 68% 的成功率;我们还量化了在利用错误消息反馈进行重试时该成功率如何提升,以及它如何随着所需代码和提示数量的增加而下降。我们希望,随着 LLM 和验证技术质量的提升,DafnyBench 能够推动在此基线之上快速改进。

英文摘要:

We introduce DafnyBench, the largest benchmark of its kind for training and evaluating machine learning systems for formal software verification. We test the ability of LLMs such as GPT-4 and Claude 3 to auto-generate enough hints for the Dafny formal verification engine to successfully verify over 750 programs with about 53,000 lines of code. The best model and prompting scheme achieved 68% success rate, and we quantify how this rate improves when retrying with error message feedback and how it deteriorates with the amount of required code and hints. We hope that DafnyBench will enable rapid improvements from this baseline as LLMs and verification techniques grow in quality.

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

↑