Skip to main content
QUICK REVIEW

[论文解读] Lemma Discovery in Agentic Program Verification

Huan Zhao, Haoxin Tu|arXiv (Cornell University)|Mar 23, 2026
Logic, programming, and type systemsComputer Science被引用 0
一句话总结

论文提出 LemmaNet,一个基于大模型的代理,在离线从源码中发现辅助引理,在证明过程中在线发现以连接语义感知的验证条件与证明目标导向的验证条件,从而提升对真实世界软件的 deductive verification。

ABSTRACT

Deductive verification provides strong correctness guarantees for code by extracting verification conditions (VCs) and writing formal proofs for them. The expertise-intensive task of VC proving is the main bottleneck in this process, and has been partly automated owing to recent advances in Large Language Model (LLM) agents. However, existing proof agents are not able to discover helper lemmas - auxiliary lemmas that aid in proving - and thus fall short as programs grow in size and complexity. In this paper, we argue that VC proving for program verification is more than a purely mathematical task, and benefits considerably from program comprehension. Our key insight is that human-proof engineers often discover and apply helper lemmas based on their understanding of the program semantics, which are not directly reflected in the VCs produced by VC generators. Inspired by this insight, we propose an LLM agent, LemmaNet, that discovers helper lemmas in two ways. Specifically, the agent first synthesizes lemmas offline by directly analyzing the source code and specifications, and then relating this semantic understanding to the mechanical, verbose encoding produced by VC generators. As the proof unfolds, LemmaNet then adapts existing helper lemmas online to accommodate evolving proof states, enabling the agent to effectively discharge complex VCs on-the-fly. We evaluate LemmaNet on SV-COMP and established real-world subjects, including modules of the Linux kernel, Contiki OS, standard C++ library, and X.509 parser. Our experimental results demonstrate that LemmaNet significantly outperforms state-of-the-art approaches, highlighting the importance of program comprehension-aided lemma discovery in agentic program verification.

研究动机与目标

  • 证明通过辅助引理发现提升对验证条件的理解有利于 VC 证明。
  • 提出一个 dual-stage LemmaNet 架构,包含离线引理合成与在线引理自适应。
  • 证明将语义感知的 VCs 与证明目标导向的 VCs 融合可以提高对复杂验证条件的完成度。
  • 在真实世界软件和基准测试上评估 LemmaNet,以确立有效性与鲁棒性。

提出的方法

  • 离线引理合成分析源代码与规格,生成与语义对齐的辅助引理, bridging semantics-aware VCs 与 proof-targeted VCs。
  • 在线引理适配器在证明过程中基于证明助手反馈对辅助引理进行细化与适应。
  • 在现有逐步证明代理之上构建系统,包含程序语义分析器与义务对齐的引理合成。
  • 分阶段工作流:生成语义感知的 VC;合成 bridge 引理;用可信 VC 生成器完成 VC 的 discharge;随着证明状态演化在线适配引理。

实验结果

研究问题

  • RQ1由程序语义推导的辅助引理是否能提升传统 VC 生成器产生的验证条件的 discharge?
  • RQ2离线语义分析与在线自适应如何协同工作以桥接语义感知与证明目标导向的 VCs?
  • RQ3基于引理发现的代理是否在真实世界的软件验证任务中优于最先进的证明代理?
  • RQ4哪些类型的真实世界软件(如 Linux 内核模块、Contiki OS、标准库)最能从语义引理发现中受益?

主要发现

  • LemmaNet 在基准测试中显著优于最先进的证明代理 AutoRocq 与 Copra,提升幅度为 26.8%–51.7%。
  • 离线合成得到与程序语义对齐的辅助引理,桥接语义感知的 VCs 与证明目标导向的 VCs。
  • 在线引理自适应在证明过程中对引理进行细化,以应对演化的证明状态,提升对复杂 VC 的 discharge。
  • 评估覆盖 Linux 内核模块、Contiki OS、X.509 解析器,以及标准 C++ 库。
  • 该方法凸显程序理解在代理驱动程序验证中引理发现的重要性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。