arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.17330cs.SE
收藏

软件系统的代理验证

Agentic Verification of Software Systems

National University of Singapore(新加坡国立大学)

Haoxin Tu, Huan Zhao, Yahui Song, Mehtab Zafar, Ruijie Meng, Abhik Roychoudhury

AI总结:

本文提出AutoRocq代理,通过与Rocq定理证明器协作实现程序验证,采用迭代优化提升证明质量,实验显示在SV-COMP和Linux内核模块上具有良好的自动验证效果。

摘要:

近年来,自动生成功能因大型语言模型的普及而受到关注。AlphaProof项目展示了AI在通用数学推理中的潜力。计算机程序的推理可通过通用数学推理实现,但更结构化且上下文更丰富。这提出了一个吸引人的命题,即AI代理可以用于验证大量由AI生成的代码。本文提出首个LLM代理AutoRocq用于程序验证。与以往依赖大量证明示例训练不同,我们的代理在飞行中学习并通过迭代优化循环改进证明。通过证明代理与Rocq(曾为Coq)定理证明器的通信获取额外上下文和反馈,实现证明的迭代改进。最终结果是经过Rocq定理证明器检查的证明推导。这样,我们的证明构造涉及证明代理与定理证明器的自主协作。这种自主性有助于在证明搜索和决定证明树结构时做出决策。在SV-COMP基准和Linux内核模块上的实验评估显示,在实现自动程序验证方面具有良好的效果。随着代码生成自动化程度的提高,我们提出我们的证明代理可以潜在地与AI编码代理集成,实现生成与验证循环,从而更接近受信任的自动编程愿景。

英文摘要:

Automatically generated code is gaining traction recently, owing to the prevalence of Large Language Models (LLMs). Further, the AlphaProof initiative has demonstrated the possibility of using AI for general mathematical reasoning. Reasoning about computer programs (software) can be accomplished via general mathematical reasoning; however, it tends to be more structured and richer in contexts. This forms an attractive proposition, since then AI agents can be used to reason about voluminous code that gets generated by AI. In this work, we present a first LLM agent, AutoRocq, for conducting program verification. Unlike past works, which rely on extensive training of LLMs on proof examples, our agent learns on-the-fly and improves the proof via an iterative refinement loop. The iterative improvement of the proof is achieved by the proof agent communicating with the Rocq (formerly Coq) theorem prover to get additional context and feedback. The final result of the iteration is a proof derivation checked by the Rocq theorem prover. In this way, our proof construction involves autonomous collaboration between the proof agent and the theorem prover. This autonomy facilitates the search for proofs and decision-making in deciding on the structure of the proof tree. Experimental evaluation on SV-COMP benchmarks and on Linux kernel modules shows promising efficacy in achieving automated program verification. As automation in code generation becomes more widespread, we posit that our proof agent can be potentially integrated with AI coding agents to achieve a generate and validate loop, thus moving closer to the vision of trusted automatic programming.

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

↑