Lemma Discovery in Agentic Program Verification
Huan Zhao, Haoxin Tu, Zhengyao Liu, Martin Rinard, Abhik Roychoudhury

TL;DR
This paper introduces LemmaNet, an LLM-based agent that enhances program verification by automatically discovering and adapting helper lemmas through program comprehension, significantly improving verification of complex codebases.
Contribution
Proposes LemmaNet, an LLM agent that synthesizes and adapts helper lemmas based on program semantics to improve deductive verification processes.
Findings
Outperforms state-of-the-art verification agents on SV-COMP and real-world code.
Effectively synthesizes helper lemmas from source code and specifications.
Successfully verifies complex modules like Linux kernel components.
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,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Formal Methods in Verification · Model-Driven Software Engineering Techniques
