Loop Invariant Inference through SMT Solving Enhanced Reinforcement Learning
Shiwen Yu, Ting Wang, Ji Wang
摘要
Inferring loop invariants is one of the most challenging problems in program verification. It is highly desired to incorporate machine learning when inferring. This paper presents a Reinforcement Learning (RL) pruning framework to infer loop invariants over a general nonlinear hypothesis space. The key idea is to synergize the RL-based pruning and SMT solving to generate candidate invariants efficiently. To address the sparse reward problem in learning, we design a novel two-dimensional reward mechanism that enables the RL pruner to recognize the capability boundary of SMT solvers and learn the pruning heuristics in a few rounds. We have implemented our approach with Z3 SMT solver in the tool called LIPuS and conducted extensive experiments over the linear and nonlinear benchmarks. Experiment results show that LIPuS can solve the most cases compared to the state-of-the-art loop invariant inference tools such as Code2Inv, ICE-DT, GSpacer, SymInfer, ImplCheck, and Eldarica. Especially, LIPuS outperforms them significantly on nonlinear benchmarks.
问 Lune
几分钟看清这篇 Paper 的位置,不用再花一下午。
Lune 能读引用它和与它最相关的顶会 Paper,讲清它说了什么、后来怎样、哪里站不住,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- LLM Meets Bounded Model Checking: Neuro-symbolic Loop Invariant Inference 引用了 Enchanting Program Specification Synthesis by Large Language Models Using Static Analysis and Program Verification
- Clause2Inv: A Generate-Combine-Check Framework for Loop Invariant Inference 引用了 LLM Meets Bounded Model Checking: Neuro-symbolic Loop Invariant Inference
引用它的顶会 Paper3
- Enchanting Program Specification Synthesis by Large Language Models Using Static Analysis and Program VerificationCheng Wen, Jialun Cao, Jie Su, Zhiwu Xu 等CAV 2024 · 60 次引用
- LLM Meets Bounded Model Checking: Neuro-symbolic Loop Invariant InferenceGuangyuan Wu, Weining Cao, Yuan Yao, Hengfeng Wei 等ASE 2024 · 9 次引用
- Clause2Inv: A Generate-Combine-Check Framework for Loop Invariant InferenceWeining Cao, Guangyuan Wu, Tangzhi Xu, Yuan Yao 等ISSTA 2025 · 2 次引用
相关 Paper
- Learning to Synthesize Relational InvariantsJingbo Wang, Chao WangASE 2022 · 9 次引用
- CLN2INV: Learning Loop Invariants with Continuous Logic NetworksGabriel Ryan, Justin Wong, Jianan Yao, Ronghui Gu 等ICLR 2020 · 72 次引用
- Multi-phase invariant synthesisDaniel Riley, Grigory FedyukovichFSE 2022 · 13 次引用
- MALICE: Memory-aware Loop Invariants Generation on Symbolic Execution TracesTong Chen, Siyu Liu, Hongyi Zhong, liao zhang 等ICML 2026
- LLM-Guided Loop Bound Generation for Program Termination VerificationZan Gong, Biting Huang, Fei HeICML 2026
