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

面向智能体化证明 harness 工程

Towards Agentic Proof Harness Engineering

Carl von Ossietzky Universität Oldenburg(奥尔登堡卡尔·冯·奥西茨基大学);Humbold-Universität zu Berlin(柏林洪堡大学)

Rohith Kumar Shanmuganathan, Cedric Richter, Heike Wehrheim

AI总结:

该研究提出智能体化证明 harness 工程师,结合形式化保护机制自动构建验证用 harness,经 curl、libuv 案例验证,可让 CBMC 检测所有三个断言违规,且 harness 可复用。

摘要:

对现实世界项目的形式化验证需要大量人工工作,从指定正确性属性到构建检查所需的基础设施。我们设想能在整个过程中协助开发者的验证智能体。在涉及的众多任务中,有一项任务兼具基础性和可自动化性:证明 harness 工程。证明 harness 为程序单元(如函数或模块)定义了一个隔离的验证环境,通过提供符号输入、初始化代码及其依赖项的模型来实现。如今,证明 harness 工程在很大程度上仍是由验证工程师执行的手动任务。为探索编码智能体在该任务中的潜力,我们提出了一种智能体化证明 harness 工程师,它能根据软件项目和指定的验证目标自动构建可用于验证器的 harness。我们将该智能体与形式化的正确性和精度保护机制相结合,以验证生成的抽象并指导其优化。我们通过对 curl 和 libuv 的探索性案例研究评估了该方法的可行性,使用源代码中已嵌入的三个历史断言违规作为验证属性。结果表明,该智能体成功构建了证明 harness,使 CBMC 能够检测到所有三个违规。我们进一步证明了这些 harness 可与其他验证工具复用的潜力。

英文摘要:

Formal verification of real-world projects requires substantial manual effort, from specifying correctness properties to constructing the infrastructure needed to check them. We envision verification agents that assist developers throughout this process. Among the many tasks involved, one stands out as both foundational and amenable to automation: proof-harness engineering. A proof harness defines an isolated verification environment for a program unit, such as a function or module, by providing symbolic inputs, initialization code, and models of its dependencies. Today, proof-harness engineering remains largely a manual task performed by verification engineers. To explore the potential of coding agents for this task, we propose an agentic proof-harness engineer that automatically constructs verifier-ready harnesses from a software project and a designated verification target. We combine the agent with formal soundness and precision guards to validate generated abstractions and guide their refinement. We evaluate the feasibility of our approach in an exploratory case study on curl and libuv, using three historical assertion violations already embedded in the source code as verification properties. Our results show that the agent successfully constructs proof harnesses that enable CBMC to detect all three violations. We further demonstrate the potential for reusing these harnesses with other verification tools.

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

↑