arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2409.13082cs.SEcs.AIcs.FL
收藏

AutoVerus:面向 Rust 代码的自动化证明生成

AutoVerus: Automated Proof Generation for Rust Code

University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Columbia University(哥伦比亚大学);University of California Irvine(加州大学尔湾分校);University of Toronto(多伦多大学);Microsoft Research(微软研究院);Microsoft Research Asia(微软亚洲研究院);University of Chicago(芝加哥大学)

Chenyuan Yang, Xuheng Li, Md Rakib Hossain Misu, Jianan Yao, Weidong Cui, Yeyun Gong, Chris Hawblitzel, Shuvendu Lahiri, Jacob R. Lorch, Shuai Lu, Fan Yang, Ziqiao Zhou, Shan Lu

AI总结:

AutoVerus 利用 LLM 智能体网络模拟人类专家三阶段证明构建过程,自动为 Rust 代码生成 Verus 正确性证明,在 150 个非平凡任务上正确率超过 90%。

摘要:

生成式人工智能已在许多软件工程任务中展现出价值。基于大语言模型(LLM)的证明生成仍处于起步阶段,落后于基于 LLM 的代码生成。本文提出了 AutoVerus。AutoVerus 利用 LLM 自动为 Rust 代码生成正确性证明。AutoVerus 的设计契合 Verus 的独特特性,Verus 是一个验证工具,可以使用同样以 Rust 编写的证明和规范来证明 Rust 代码的正确性。AutoVerus 由一个 LLM 智能体网络组成,这些智能体经过精心设计与编排,以模拟人类专家构建证明的三个阶段:初步证明生成、在通用提示指导下进行证明精化,以及在验证错误引导下进行证明调试。为全面评估 AutoVerus 并促进该方向的未来研究,我们基于现有的代码生成基准和验证基准构建了一个包含 150 个非平凡证明任务的基准套件。评估结果表明,AutoVerus 能够为其中超过 90% 的任务自动生成正确证明,其中超过一半的任务在不到 30 秒或 3 次 LLM 调用内完成。

英文摘要:

Generative AI has shown its values for many software engineering tasks. Still in its infancy, large language model (LLM)-based proof generation lags behind LLM-based code generation. In this paper, we present AutoVerus. AutoVerus uses LLMs to automatically generate correctness proof for Rust code. AutoVerus is designed to match the unique features of Verus, a verification tool that can prove the correctness of Rust code using proofs and specifications also written in Rust. AutoVerus consists of a network of LLM agents that are crafted and orchestrated to mimic human experts' three phases of proof construction: preliminary proof generation, proof refinement guided by generic tips, and proof debugging guided by verification errors. To thoroughly evaluate AutoVerus and help foster future research in this direction, we have built a benchmark suite of 150 non-trivial proof tasks, based on existing code-generation benchmarks and verification benchmarks. Our evaluation shows that AutoVerus can automatically generate correct proof for more than 90% of them, with more than half of them tackled in less than 30 seconds or 3 LLM calls.

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

↑