mlsanityData to 14 Oct 2026

Finding Inductive Loop Invariants using Large Language Models

arXiv 2311.07948 ↗First posted 14 Nov 2023cs.PL cs.LGcited by 36

Not on the map. Why?

Abstract (arXiv)

Loop invariants are fundamental to reasoning about programs with loops. They establish properties about a given loop's behavior. When they additionally are inductive, they become useful for the task of formal verification that seeks to establish strong mathematical guarantees about program's runtime behavior. The inductiveness ensures that the invariants can be checked locally without consulting the entire program, thus are indispensable artifacts in a formal proof of correctness. Finding inductive loop invariants is an undecidable problem, and despite a long history of research towards practical solutions, it remains far from a solved problem. This paper investigates the capabilities of the Large Language Models (LLMs) in offering a new solution towards this old, yet important problem. To that end, we first curate a dataset of verification problems on programs with loops. Next, we design a prompt for exploiting LLMs, obtaining inductive loop invariants, that are checked for correctness using sound symbolic tools. Finally, we explore the effectiveness of using an efficient combination of a symbolic tool and an LLM on our dataset and compare it against a purely symbolic baseline. Our results demonstrate that LLMs can help improve the state-of-the-art in automated program verification.

Key facts. Cited by 36 papers in the map (data through 14 Oct 2026). Builds on 5 of its 32 references that are in the map. First posted on arXiv 14 Nov 2023.

Builds on

5 of 32 references.

References · 5

  1. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  3. 2023Ranking LLM-Generated Loop Invariants for Program Verificationcited by 33
  4. 2019CLN2INV: Learning Loop Invariants with Continuous Logic Networkscited by 20
  5. 2020Learning Nonlinear Loop Invariants with Gated Continuous Logic Networks (Extended Version)cited by 17

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 10; 2025: 15; 2026: 11.

36 papers.

Sort:

By area:

  1. 2024A Survey on Deep Learning for Theorem Provingcited by 57
  2. 2024Code Repair with LLMs gives an Exploration-Exploitation Tradeoffcited by 51
  3. 2024Automated Proof Generation for Rust Code via Self-Evolutioncited by 33
  4. 2024LLMDFA: Analyzing Dataflow in Code with Large Language Modelscited by 22
  5. 2024FVEL: Interactive Formal Verification Environment with Large Language Models via Theorem Provingcited by 22
  6. 2025Frontier AI's Impact on the Cybersecurity Landscapecited by 21
  7. 2025Autoformalization in the Era of Large Language Models: A Surveycited by 21
  8. 2024Towards Neural Synthesis for SMT-Assisted Proof-Oriented Programmingcited by 20
  9. 2024Evaluating LLM-driven User-Intent Formalization for Verification-Aware Languagescited by 16
  10. 2025ClassInvGen: Class Invariant Synthesis using Large Language Modelscited by 11
  11. 2026Goedel-Code-Prover: Hierarchical Proof Search for Open State-of-the-Art Code Verificationcited by 11
  12. 2024Guiding Enumerative Program Synthesis with Large Language Modelscited by 9
24 more
  1. 2025VeriStruct: AI-assisted Automated Verification of Data-Structure Modules in Veruscited by 9
  2. 2024Enhancing Automated Loop Invariant Generation for Complex Programs with Large Language Modelscited by 7
  3. 2024Specify What? Enhancing Neural Specification Synthesis by Symbolic Methodscited by 6
  4. 2025RAG-Verus: Repository-Level Program Verification with LLMs using Retrieval Augmented Generationcited by 4
  5. 2025EditLord: Learning Code Transformation Rules for Code Editingcited by 4
  6. 2025Quokka: Accelerating Program Verification with LLMs via Invariant Synthesiscited by 4
  7. 2025Next Steps in LLM-Supported Java Verificationcited by 3
  8. 2025Can LLMs Enable Verification in Mainstream Programming?cited by 3
  9. 2025Agentic Specification Generator for Move Programscited by 3
  10. 2026ExVerus: Verus Proof Repair via Counterexample Reasoningcited by 3
  11. 2026Doc2Spec: Synthesizing Formal Programming Specifications from Natural Language via Grammar Inductioncited by 2
  12. 2025Understanding Formal Reasoning Failures in LLMs as Abstract Interpreterscited by 1
  13. 2025LLM For Loop Invariant Generation and Fixing: How Far Are We?cited by 1
  14. 2025The 4/δ Bound: Designing Predictable LLM-Verifier Systems for Formal Method Guaranteecited by 1
  15. 2026Evaluating LLM-Generated ACSL Annotations for Formal Verificationcited by 1
  16. 2026Automating Formal Verification with Reinforcement Learning and Recursive Inferencecited by 1
  17. 2025Loop Invariant Generation: A Hybrid Framework of Reasoning optimised LLMs and SMT Solverscited by 0
  18. 2025A Neurosymbolic Approach to Loop Invariant Generation via Weakest Precondition Reasoningcited by 0
  19. 2026Combining Mechanical and Agentic Specification Inference for Movecited by 0
  20. 2026Neuro-Symbolic Software Verification: Hyper-charging Local Language Models with Symbolic Reasoning at Scalecited by 0
  21. 2026Privilege and confidentiality in generative AI workflowscited by 0
  22. 2026Diversifying to Verify: When Task-Equivalent Programs Differ in Verifiabilitycited by 0
  23. 2026Schwarz: Solver-Aware Agentic Program Verificationcited by 0
  24. 2026Djinnlang: Higher-Level Programming by Unambiguous Specification with an LLM in the Compilercited by 0