Interval counterexamples for loop invariant learning
Rongchen Xu, Fei He, Bow-Yaw Wang
Abstract
Loop invariant generation has long been a challenging problem. Black-box learning has recently emerged as a promising method for inferring loop invariants. However, the performance depends heavily on the quality of collected examples. In many cases, only after tens or even hundreds of constraint queries, can a feasible invariant be successfully inferred.
To reduce the gigantic number of constraint queries and improve the performance of black-box learning, we introduce interval counterexamples into the learning framework. Each interval counterexample represents a set of counterexamples from constraint solvers. We propose three different generalization techniques to compute interval counterexamples. The existing decision tree algorithm is also improved to adapt interval counterexamples. We evaluate our techniques and report over 40% improvement on learning rounds and verification time over the state-of-the-art approach.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 92dedfd0-8bfd-4174-8262-4f63dda1cb41Cited by top-tier papers5
- Affine Loop Invariant Generation via Matrix AlgebraYucheng Ji, Hongfei Fu, Bin Fang, Haibo ChenCAV 2022 · 10 citations
- LLM Meets Bounded Model Checking: Neuro-symbolic Loop Invariant InferenceGuangyuan Wu, Weining Cao, Yuan Yao, Hengfeng Wei et al.ASE 2024 · 9 citations
- Data-Driven Loop Bound Learning for Termination AnalysisRongchen Xu, Jianhui Chen, Fei HeICSE 2022 · 6 citations
- Demystifying Template-Based Invariant Generation for Bit-Vector ProgramsPeisen Yao, Jingyu Ke, Jiahui Sun, Hongfei Fu et al.ASE 2023 · 3 citations
- Clause2Inv: A Generate-Combine-Check Framework for Loop Invariant InferenceWeining Cao, Guangyuan Wu, Tangzhi Xu, Yuan Yao et al.ISSTA 2025 · 2 citations
Related papers
- Loop Invariant Inference through SMT Solving Enhanced Reinforcement LearningShiwen Yu, Ting Wang, Ji WangISSTA 2023 · 11 citations
- Complexity and information in invariant inferenceYotam M. Y. Feldman, Neil Immerman, Mooly Sagiv, Sharon ShohamPOPL 2020 · 12 citations
- Simple Linear Loops: Algebraic Invariants and ApplicationsRida Ait El Manssour, George Kenison, Mahsa Shirmohammadi, Anton VaronkaPOPL 2025 · 2 citations
- Polynomial Invariant Generation for Floating-Point ProgramsXuran Cai, Liqian Chen, Hongfei FuCAV 2026
- Multi-phase invariant synthesisDaniel Riley, Grigory FedyukovichFSE 2022 · 13 citations
