mlsanityData to 14 Oct 2026

Enhancing Automated Loop Invariant Generation for Complex Programs with Large Language Models

arXiv 2412.10483 ↗First posted 13 Dec 2024cs.SE cs.AI cs.PLcited by 7

Not on the map. Why?

Abstract (arXiv)

Automated program verification has always been an important component of building trustworthy software. While the analysis of real-world programs remains a theoretical challenge, the automation of loop invariant analysis has effectively resolved the problem. However, real-world programs that often mix complex data structures and control flows pose challenges to traditional loop invariant generation tools. To enhance the applicability of invariant generation techniques, we proposed ACInv, an Automated Complex program loop Invariant generation tool, which combines static analysis with Large Language Models (LLMs) to generate the proper loop invariants. We utilize static analysis to extract the necessary information for each loop and embed it into prompts for the LLM to generate invariants for each loop. Subsequently, we employ an LLM-based evaluator to assess the generated invariants, refining them by either strengthening, weakening, or rejecting them based on their correctness, ultimately obtaining enhanced invariants. We conducted experiments on ACInv, which showed that ACInv outperformed previous tools on data sets with data structures, and maintained similar performance to the state-of-the-art tool AutoSpec on numerical programs without data structures. For the total data set, ACInv can solve 21% more examples than AutoSpec and can generate reference data structure templates.

Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Builds on 19 of its 53 references that are in the map. First posted on arXiv 13 Dec 2024.

Builds on

19 of 53 references.

References · 19

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2020Language Models are Few-Shot Learnerscited by 32,419
  4. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  5. 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,211
  6. 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,234
  7. 2023Large Language Models as Optimizerscited by 864
  8. 2023CodePlan: Repository-level Coding using LLMs and Planningcited by 140
  9. 2024IRIS: LLM-Assisted Static Analysis for Detecting Security Vulnerabilitiescited by 103
  10. 2024Enchanting Program Specification Synthesis by Large Language Models using Static Analysis and Program Verificationcited by 58
  11. 2023A Quantitative and Qualitative Evaluation of LLM-Based Explainable Fault Localizationcited by 50
  12. 2023Finding Inductive Loop Invariants using Large Language Modelscited by 36
7 more
  1. 2023Ranking LLM-Generated Loop Invariants for Program Verificationcited by 33
  2. 2019CLN2INV: Learning Loop Invariants with Continuous Logic Networkscited by 20
  3. 2020Learning Nonlinear Loop Invariants with Gated Continuous Logic Networks (Extended Version)cited by 17
  4. 2023CBMC: The C Bounded Model Checkercited by 12
  5. 2019SLING: Using Dynamic Analysis to Infer Program Invariants in Separation Logiccited by 7
  6. 2023Towards General Loop Invariant Generation: A Benchmark of Programs with Memory Manipulationcited by 7
  7. 2016Polynomial invariants by linear algebracited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 4; 2026: 3.

7 papers.