The DOI matches its DataCite record; 20 of the 20 references it cites were found in a registry or an index.
Towards General Loop Invariant Generation: A Benchmark of Programs with Memory Manipulation
Open accessAbstract
Program verification is vital for ensuring software reliability, especially in the context of increasingly complex systems. Loop invariants, remaining true before and after each iteration of loops, are crucial for this verification process. Traditional provers and machine learning based methods for generating loop invariants often require expert intervention or extensive labeled data, and typically only handle numerical property verification. These methods struggle with programs involving complex data structures and memory manipulations, limiting their applicability and automation capabilities. In this paper, we introduce a new benchmark named LIG-MM, specifically for programs with complex data structures and memory manipulations. We collect 312 programs from various sources, including daily programs from college homework, the international competition (SV-COMP), benchmarks from previous papers (SLING), and programs from real-world software systems (Linux Kernel, GlibC, LiteOS, and Zephyr). Based on LIG-MM, our findings indicate that previous methods, including GPT-4, fail to automate verification for these programs. Consequently, we propose a novel LLM-SE framework that coordinates LLM with symbolic execution, fine-tuned using self-supervised learning, to generate loop invariants. Experimental results on LIG-MM demonstrate that our LLM-SE outperforms state-of-the-art methods, offering a new direction toward automated program verification in real-world scenarios.
Overview
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
Many existing works combine LLMs and formal methods, highlighting the ability of LLMs to effectively incorporate feedback from a verification engine.
“Many existing works combine LLMs and formal methods, highlighting the ability of LLMs to effectively incorporate feedback from a verification engine.”
From Position: Vibe Coding Needs Vibe Reasoning: Improving Vibe Coding with Formal Verification (2025) · cites this paper as [20]
Section 4.2 describes this paper’s interactive framework, in which verification tools check and refine LLM-generated terms, and the updated assertions are used in subsequent inference. The paper thus supports an example of LLM–formal-methods collaboration, but it does not establish that many existing works demonstrate LLMs effectively incorporating verification-engine feedback. (LLM, conf=0.85)
Experimental — accuracy not yet measuredType I systems use formal methods to filter out solutions that do not satisfy a specification and provide feedback to the LLM, iterating until a valid solution is reached.
“Type I systems (Figure 2, left) use formal methods to filter out solutions that do not satisfy a certain specification, and provide feedback (e.g., a counterexample) to the LLM, iterating until a valid solution is reached (e.g., loop-invariant synthesis with formal tools in the loop [2, 12, 20, 21, 38], static analysisguided repair [27]).”
From Position: Vibe Coding Needs Vibe Reasoning: Improving Vibe Coding with Formal Verification (2025) · cites this paper as [20]
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2018) · arXiv · doi:10.48550/arxiv.1810.04805 · Cited by 73,173
mixup: Beyond Empirical Risk Minimization
Zhang, H., Cisse, M., Dauphin, Y. N., & Lopez-Paz, D. (2017) · arXiv · doi:10.48550/arxiv.1710.09412 · Cited by 5,831
Wang, Y., Wang, W., Joty, S., & Hoi, S. C. H. (2021) · arXiv · doi:10.48550/arxiv.2109.00859 · Cited by 1,495
AutoAugment: Learning Augmentation Policies from Data
Cubuk, E. D., Zoph, B., Mane, D., Vasudevan, V., & Le, Q. V. (2018) · arXiv · doi:10.48550/arxiv.1805.09501 · Cited by 1,106
Teaching Large Language Models to Self-Debug
Chen, X., Lin, M., Schärli, N., & Zhou, D. (2023) · arXiv · doi:10.48550/arxiv.2304.05128 · Cited by 812
Cao, Y., Li, S., Liu, Y., Yan, Z., Dai, Y., Yu, P. S., & Sun, L. (2023) · arXiv · doi:10.48550/arxiv.2303.04226 · Cited by 463
StarCoder: may the source be with you!
Li, R., Allal, L. B., Zi, Y., Muennighoff, N., Kocetkov, D., Mou, C., Marone, M., Akiki, C., Li, J., Chim, J., et al. (2023) · arXiv · doi:10.48550/arxiv.2305.06161 · Cited by 261
CodeGen2: Lessons for Training LLMs on Programming and Natural LanguagesPreprint
Nijkamp, E., Hayashi, H., Xiong, C., Savarese, S., & Zhou, Y. (2023) · arXiv (Cornell University) · doi:10.48550/arxiv.2305.02309 · Cited by 217
Learning invariants using decision trees and implication counterexamples
Garg, P., Neider, D., Madhusudan, P., & Roth, D. (2016) · ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL) · doi:10.1145/2837614.2837664 · Cited by 190
Wen, C., Cao, J.-L., Su, J., et al. (2024) · International Conference on Computer Aided Verification · doi:10.48550/arxiv.2404.00762 · Cited by 154
Data-driven precondition inference with learned features
Padhi, S., Sharma, R., & Millstein, T. D. (2016) · ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) · doi:10.1145/2908080.2908099 · Cited by 117
Progress on Software Verification: SV-COMP 2022
Beyer, D. (2022) · Lecture notes in computer science · doi:10.1007/978-3-030-99527-0_20 · Cited by 101
O’Hearn, P. W. (2019) · Communications of the ACM · doi:10.1145/3211968 · Cited by 90
CLN2INV: Learning Loop Invariants with Continuous Logic NetworksPreprint
Ryan, G., Wong, J., Yao, J., Gu, R.-H., & Jana, S. (2019) · International Conference on Learning Representations · doi:10.48550/arxiv.1909.11542 · Cited by 82
SLING: using dynamic analysis to infer program invariants in separation logic
Le, T. C., Zheng, G., & Nguyen, T. H. (2019) · Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/3314221.3314634 · Cited by 21
Ilinva: Using Abduction to Generate Loop Invariants
Echenim, M., Peltier, N., & Sellami, Y. (2019) · Lecture notes in computer science · doi:10.1007/978-3-030-29007-8_5 · Cited by 8
Learning nonlinear loop invariants with gated continuous logic networks
Yao, J., Ryan, G., Wong, J., Jana, S., & Gu, R. (2020) · ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) · doi:10.1145/3385412.3385986 · Cited by 2
Overfitting in Synthesis: Theory and Practice (Extended Version)Preprint
Padhi, S., Millstein, T. D., Nori, A. V., et al. (2019) · arXiv (Cornell University) · doi:10.48550/arxiv.1905.07457 · Cited by 1
From Polynomial Invariants to Linear LoopsPreprint
Kenison, G., Kovács, L., & Varonka, A. (2023) · arXiv (Cornell University) · doi:10.48550/arxiv.2302.06323
OpenAI, Achiam, J., Adler, S., Agarwal, S., Ahmad, L., Akkaya, I., Aleman, F. L., Almeida, D., Altenschmidt, J., Altman, S., et al. (2023) · arXiv · doi:10.48550/arxiv.2303.08774
Flagged first, then by citations
Research works printed but not linked: 26
- K. Sieber, The foundations of program verification. Springer-Verlag, 2013.
- J. H. Fetzer, "Program verification: The very idea," Communications of the ACM, vol. 31, no. 9, pp. 1048-1063, 1988.
- S. Srivastava, S. Gulwani, and J. S. Foster, "From program verification to program synthe- sis," in Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, 2010, pp. 313-326.
- J. B. Almeida, M. J. Frade, J. S. Pinto, and S. M. De Sousa, Rigorous software development: an introduction to program verification. Springer, 2011, vol. 1.
- P. Koopman and M. Wagner, "Challenges in autonomous vehicle testing and validation," SAE International Journal of Transportation Safety, vol. 4, no. 1, pp. 15-24, 2016.
- Z. Daw, R. Cleaveland, and M. Vetter, "Formal verification of software-based medical devices considering medical guidelines," International journal of computer assisted radiology and surgery, vol. 9, pp. 145-153, 2014.
- C. Colombo and G. J. Pace, "Industrial experiences with runtime verification of financial transaction systems: lessons learnt and standing challenges," in Lectures on Runtime Verification: Introductory and Advanced Topics. Springer, 2018, pp. 211-232.
- T. Dreossi, D. J. Fremont, S. Ghosh, E. Kim, H. Ravanbakhsh, M. Vazquez-Chanlatte, and S. A. Seshia, "Verifai: A toolkit for the formal design and analysis of artificial intelligence-based systems," in International Conference on Computer Aided Verification. Springer, 2019, pp. 432-442.
- F. Rajaona, I. Boureanu, V. Malvone, and F. Belardinelli, "Program semantics and verification technique for ai-centred programs," in International Symposium on Formal Methods. Springer, 2023, pp. 473-491.
- C. A. R. Hoare, "An axiomatic basis for computer programming," Communications of the ACM, vol. 12, no. 10, pp. 576-580, 1969.
- C. A. Furia, B. Meyer, and S. Velder, "Loop invariants: Analysis, classification, and examples," ACM Computing Surveys (CSUR), vol. 46, no. 3, pp. 1-51, 2014.
- X. Si, H. Dai, M. Raghothaman, M. Naik, and L. Song, "Learning loop invariants for program verification," in Proceedings of the 32nd International Conference on Neural Information Processing Systems, ser. NIPS'18. Red Hook, NY, USA: Curran Associates Inc., 2018, p. 7762-7773.
- S. Padhi and T. D. Millstein, "Data-driven loop invariant inference with automatic feature synthesis," CoRR, vol. abs/1707.02029, 2017. [Online]. Available: http: //arxiv.org/abs/1707.02029 · arXiv
- S.-W. Lin, J. Sun, H. Xiao, Y. Liu, D. Sanán, and H. Hansen, "Fib: Squeezing loop invariants by interpolation between forward/backward predicate transformers," in 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 2017, pp. 793- 803.
- J. Laurent and A. Platzer, "Learning to find proofs and theorems by learning to refine search strategies," CoRR, vol. abs/2205.14229, 2022. [Online]. Available: https://doi.org/10.48550/arXiv.2205.14229 · DOI
- R. Baldoni, E. Coppa, D. C. D'Elia, C. Demetrescu, and I. Finocchi, "A survey of symbolic execution techniques," ACM Comput. Surv., vol. 51, no. 3, 2018.
- E. Nijkamp, B. Pang, H. Hayashi, L. Tu, H. Wang, Y. Zhou, S. Savarese, and C. Xiong, "Codegen: An open large language model for code with multi-turn program synthesis," arXiv preprint arXiv:2203.13474, 2022. · arXiv
- S. Padhi, R. Sharma, and T. Millstein, "Data-driven precondition inference with learned features," ACM SIGPLAN Notices, vol. 51, no. 6, pp. 42-56, 2016.
- J.-C. Filliâtre and A. Paskevich, "Why3-where programs meet provers," in Programming Languages and Systems: 22nd European Symposium on Programming, ESOP 2013, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2013, Rome, Italy, March 16-24, 2013. Proceedings 22. Springer, 2013, pp. 125-128.
- M. Echenim, N. Peltier, and Y. Sellami, "A generic framework for implicate generation modulo theories," in Automated Reasoning: 9th International Joint Conference, IJCAR 2018, Held as Part of the Federated Logic Conference, FloC 2018, Oxford, UK, July 14-17, 2018, Proceedings 9. Springer, 2018, pp. 279-294.
- L. De Moura and N. Bjørner, "Z3: An efficient smt solver," in International conference on Tools and Algorithms for the Construction and Analysis of Systems. Springer, 2008, pp. 337-340.
- J. Laurent and A. Platzer, "Learning to find proofs and theorems by learning to refine search strategies: The case of loop invariant synthesis," Advances in Neural Information Processing Systems, vol. 35, pp. 4843-4856, 2022.
- J. Yao, G. Ryan, J. Wong, S. Jana, and R. Gu, "Learning nonlinear loop invariants with gated continuous logic networks," in Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation, 2020, pp. 106-120.
- M. D. Ernst, J. H. Perkins, P. J. Guo, S. McCamant, C. Pacheco, M. S. Tschantz, and C. Xiao, "The daikon system for dynamic detection of likely invariants," Science of computer program- ming, vol. 69, no. 1-3, pp. 35-45, 2007.
- M. Bayer, M.-A. Kaufhold, and C. Reuter, "A survey on data augmentation for text classification," ACM Computing Surveys, vol. 55, no. 7, pp. 1-39, 2022.
- S. Yun, D. Han, S. J. Oh, S. Chun, J. Choe, and Y. Yoo, "Cutmix: Regularization strategy to train strong classifiers with localizable features," in Proceedings of the IEEE/CVF international conference on computer vision, 2019, pp. 6023-6032.
Cited by
Sorted by citations
Clover: Closed-Loop Verifiable Code Generation
Sun, C., Sheng, Y., Padon, O., & Barrett, C. (2024) · Lecture Notes in Computer Science · doi:10.1007/978-3-031-65112-0_7 · Cited by 43
Position: Vibe Coding Needs Vibe Reasoning: Improving Vibe Coding with Formal Verification
Mitchell, J., & Shaaban, Y. (2025) · Proceedings of the 1st ACM SIGPLAN International Workshop on Language Models and Programming Languages · doi:10.1145/3759425.3763390 · Cited by 8
“…methods to filter out solutions that do not satisfy a certain specification, and provide feedback (e.g., a counterexample) to the LLM, iterating until a valid solution is reached (e.g., loop-invariant synthesis with formal tools in the loop [2, 12, 20, 21, 38], static analysis-guided repair [27]).”
Enhancing Automated Loop Invariant Generation for Complex Programs with Large Language Models
Liu, R., Chen, M., Wu, L.-I., Ke, J., & Li, G. (2024) · arXiv · doi:10.48550/arxiv.2412.10483 · Cited by 9
Position: Vibe Coding Needs Vibe Reasoning: Improving Vibe Coding with Formal Verification
Mitchell, J., & Shaaban, Y. (2025) · arXiv · Cited by 8
“…methods to filter out solutions that do not satisfy a certain specification, and provide feedback (e.g., a counterexample) to the LLM, iterating until a valid solution is reached (e.g., loop-invariant synthesis with formal tools in the loop [2, 12, 20, 21, 38], static analysis-guided repair [27]).”
Metadata
- Authors
- Liu, C., Wu, X., Feng, Y., Cao, Q., & Yan, J.
- Venue
- arXiv
- Publisher
- arXiv
- Published
- 2023
- Pages
- 129120-129145
- ISSN
- 1049-5258 (ISSN-L)
- arXiv
- 2311.10483
- OpenAlex
- W4415795200
- Cited by
- 7
- References
- 20
- Citations by year
- 2026: 6 · 2025: 1
- FWCI
- 2.02
- Type
- conference paper
- Language
- en
- Open access
- green
- arxiv.org
- Locations
- neural information processing systems (publishedVersion)
- arXiv (Cornell University) (submittedVersion)
- arXiv (Cornell University)
- Topics
- Physical Sciences › Computer Science › Software › Logic, programming, and type systems
- Physical Sciences › Computer Science › Software › Software Testing and Debugging Techniques
- Physical Sciences › Computer Science › Computational Theory and Mathematics › Formal Methods in Verification
- Keywords
- loop invariant generation, program verification, memory manipulation, benchmark programs, program analysis
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review