Finding Inductive Loop Invariants using Large Language Models
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
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023Ranking LLM-Generated Loop Invariants for Program Verificationcited by 33
- 2019CLN2INV: Learning Loop Invariants with Continuous Logic Networkscited by 20
- 2020Learning Nonlinear Loop Invariants with Gated Continuous Logic Networks (Extended Version)cited by 17
Built on by
Citing papers per year: 2024: 10; 2025: 15; 2026: 11.
36 papers.
Sort:
By area:
- 2024A Survey on Deep Learning for Theorem Provingcited by 57
- 2024Code Repair with LLMs gives an Exploration-Exploitation Tradeoffcited by 51
- 2024Automated Proof Generation for Rust Code via Self-Evolutioncited by 33
- 2024LLMDFA: Analyzing Dataflow in Code with Large Language Modelscited by 22
- 2024FVEL: Interactive Formal Verification Environment with Large Language Models via Theorem Provingcited by 22
- 2025Frontier AI's Impact on the Cybersecurity Landscapecited by 21
- 2025Autoformalization in the Era of Large Language Models: A Surveycited by 21
- 2024Towards Neural Synthesis for SMT-Assisted Proof-Oriented Programmingcited by 20
- 2024Evaluating LLM-driven User-Intent Formalization for Verification-Aware Languagescited by 16
- 2025ClassInvGen: Class Invariant Synthesis using Large Language Modelscited by 11
- 2026Goedel-Code-Prover: Hierarchical Proof Search for Open State-of-the-Art Code Verificationcited by 11
- 2024Guiding Enumerative Program Synthesis with Large Language Modelscited by 9
24 more
- 2025VeriStruct: AI-assisted Automated Verification of Data-Structure Modules in Veruscited by 9
- 2024Enhancing Automated Loop Invariant Generation for Complex Programs with Large Language Modelscited by 7
- 2024Specify What? Enhancing Neural Specification Synthesis by Symbolic Methodscited by 6
- 2025RAG-Verus: Repository-Level Program Verification with LLMs using Retrieval Augmented Generationcited by 4
- 2025EditLord: Learning Code Transformation Rules for Code Editingcited by 4
- 2025Quokka: Accelerating Program Verification with LLMs via Invariant Synthesiscited by 4
- 2025Next Steps in LLM-Supported Java Verificationcited by 3
- 2025Can LLMs Enable Verification in Mainstream Programming?cited by 3
- 2025Agentic Specification Generator for Move Programscited by 3
- 2026ExVerus: Verus Proof Repair via Counterexample Reasoningcited by 3
- 2026Doc2Spec: Synthesizing Formal Programming Specifications from Natural Language via Grammar Inductioncited by 2
- 2025Understanding Formal Reasoning Failures in LLMs as Abstract Interpreterscited by 1
- 2025LLM For Loop Invariant Generation and Fixing: How Far Are We?cited by 1
- 2025The 4/δ Bound: Designing Predictable LLM-Verifier Systems for Formal Method Guaranteecited by 1
- 2026Evaluating LLM-Generated ACSL Annotations for Formal Verificationcited by 1
- 2026Automating Formal Verification with Reinforcement Learning and Recursive Inferencecited by 1
- 2025Loop Invariant Generation: A Hybrid Framework of Reasoning optimised LLMs and SMT Solverscited by 0
- 2025A Neurosymbolic Approach to Loop Invariant Generation via Weakest Precondition Reasoningcited by 0
- 2026Combining Mechanical and Agentic Specification Inference for Movecited by 0
- 2026Neuro-Symbolic Software Verification: Hyper-charging Local Language Models with Symbolic Reasoning at Scalecited by 0
- 2026Privilege and confidentiality in generative AI workflowscited by 0
- 2026Diversifying to Verify: When Task-Equivalent Programs Differ in Verifiabilitycited by 0
- 2026Schwarz: Solver-Aware Agentic Program Verificationcited by 0
- 2026Djinnlang: Higher-Level Programming by Unambiguous Specification with an LLM in the Compilercited by 0
- 2026Djinnlang: Higher-Level Programming by Unambiguous Specification with an LLM in the Compiler21 Sep 2026
- 2026Schwarz: Solver-Aware Agentic Program Verification31 Aug 2026
- 2026Diversifying to Verify: When Task-Equivalent Programs Differ in Verifiability10 Jul 2026
- 2026Privilege and confidentiality in generative AI workflows6 Jul 2026
- 2026Neuro-Symbolic Software Verification: Hyper-charging Local Language Models with Symbolic Reasoning at Scale15 Jun 2026
- 2026Automating Formal Verification with Reinforcement Learning and Recursive Inference29 May 2026
- 2026Combining Mechanical and Agentic Specification Inference for Move11 May 2026
- 2026ExVerus: Verus Proof Repair via Counterexample Reasoning26 Mar 2026
- 2026Goedel-Code-Prover: Hierarchical Proof Search for Open State-of-the-Art Code Verification18 Mar 2026
- 2026Evaluating LLM-Generated ACSL Annotations for Formal Verification14 Feb 2026
- 2026Doc2Spec: Synthesizing Formal Programming Specifications from Natural Language via Grammar Induction30 Jan 2026
- 2025A Neurosymbolic Approach to Loop Invariant Generation via Weakest Precondition Reasoning17 Dec 2025
24 more
- 2025The 4/δ Bound: Designing Predictable LLM-Verifier Systems for Formal Method Guarantee30 Nov 2025
- 2025LLM For Loop Invariant Generation and Fixing: How Far Are We?9 Nov 2025
- 2025VeriStruct: AI-assisted Automated Verification of Data-Structure Modules in Verus28 Oct 2025
- 2025Agentic Specification Generator for Move Programs29 Sep 2025
- 2025Quokka: Accelerating Program Verification with LLMs via Invariant Synthesis25 Sep 2025
- 2025Loop Invariant Generation: A Hybrid Framework of Reasoning optimised LLMs and SMT Solvers1 Aug 2025
- 2025Autoformalization in the Era of Large Language Models: A Survey29 May 2025
- 2025Frontier AI's Impact on the Cybersecurity Landscape7 Apr 2025
- 2025Can LLMs Enable Verification in Mainstream Programming?18 Mar 2025
- 2025Understanding Formal Reasoning Failures in LLMs as Abstract Interpreters16 Mar 2025
- 2025EditLord: Learning Code Transformation Rules for Code Editing10 Mar 2025
- 2025ClassInvGen: Class Invariant Synthesis using Large Language Models26 Feb 2025
- 2025RAG-Verus: Repository-Level Program Verification with LLMs using Retrieval Augmented Generation7 Feb 2025
- 2025Next Steps in LLM-Supported Java Verification3 Feb 2025
- 2024Enhancing Automated Loop Invariant Generation for Complex Programs with Large Language Models13 Dec 2024
- 2024Automated Proof Generation for Rust Code via Self-Evolution21 Oct 2024
- 2024Specify What? Enhancing Neural Specification Synthesis by Symbolic Methods21 Jun 2024
- 2024FVEL: Interactive Formal Verification Environment with Large Language Models via Theorem Proving20 Jun 2024
- 2024Evaluating LLM-driven User-Intent Formalization for Verification-Aware Languages14 Jun 2024
- 2024Code Repair with LLMs gives an Exploration-Exploitation Tradeoff26 May 2024
- 2024Towards Neural Synthesis for SMT-Assisted Proof-Oriented Programming3 May 2024
- 2024A Survey on Deep Learning for Theorem Proving15 Apr 2024
- 2024Guiding Enumerative Program Synthesis with Large Language Models6 Mar 2024
- 2024LLMDFA: Analyzing Dataflow in Code with Large Language Models16 Feb 2024
- 2026ExVerus: Verus Proof Repair via Counterexample Reasoningcited by 3
- 2025Understanding Formal Reasoning Failures in LLMs as Abstract Interpreterscited by 1
- 2025Loop Invariant Generation: A Hybrid Framework of Reasoning optimised LLMs and SMT Solverscited by 0
- 2025A Neurosymbolic Approach to Loop Invariant Generation via Weakest Precondition Reasoningcited by 0
- 2026Neuro-Symbolic Software Verification: Hyper-charging Local Language Models with Symbolic Reasoning at Scalecited by 0
- 2026Neuro-Symbolic Software Verification: Hyper-charging Local Language Models with Symbolic Reasoning at Scale15 Jun 2026
- 2026ExVerus: Verus Proof Repair via Counterexample Reasoning26 Mar 2026
- 2025A Neurosymbolic Approach to Loop Invariant Generation via Weakest Precondition Reasoning17 Dec 2025
- 2025Loop Invariant Generation: A Hybrid Framework of Reasoning optimised LLMs and SMT Solvers1 Aug 2025
- 2025Understanding Formal Reasoning Failures in LLMs as Abstract Interpreters16 Mar 2025
- 2025Agentic Specification Generator for Move Programscited by 3
- 2026Combining Mechanical and Agentic Specification Inference for Movecited by 0
- 2026Schwarz: Solver-Aware Agentic Program Verificationcited by 0
- 2026Schwarz: Solver-Aware Agentic Program Verification31 Aug 2026
- 2026Combining Mechanical and Agentic Specification Inference for Move11 May 2026
- 2025Agentic Specification Generator for Move Programs29 Sep 2025
- 2024A Survey on Deep Learning for Theorem Provingcited by 57
- 2024Code Repair with LLMs gives an Exploration-Exploitation Tradeoffcited by 51
- 2024Automated Proof Generation for Rust Code via Self-Evolutioncited by 33
- 2024LLMDFA: Analyzing Dataflow in Code with Large Language Modelscited by 22
- 2024FVEL: Interactive Formal Verification Environment with Large Language Models via Theorem Provingcited by 22
- 2025Frontier AI's Impact on the Cybersecurity Landscapecited by 21
- 2025Autoformalization in the Era of Large Language Models: A Surveycited by 21
- 2024Towards Neural Synthesis for SMT-Assisted Proof-Oriented Programmingcited by 20
- 2024Evaluating LLM-driven User-Intent Formalization for Verification-Aware Languagescited by 16
- 2025ClassInvGen: Class Invariant Synthesis using Large Language Modelscited by 11
- 2026Goedel-Code-Prover: Hierarchical Proof Search for Open State-of-the-Art Code Verificationcited by 11
- 2024Guiding Enumerative Program Synthesis with Large Language Modelscited by 9
12 most cited of 26 All 26 (JSON)
- 2026Djinnlang: Higher-Level Programming by Unambiguous Specification with an LLM in the Compiler21 Sep 2026
- 2026Diversifying to Verify: When Task-Equivalent Programs Differ in Verifiability10 Jul 2026
- 2026Privilege and confidentiality in generative AI workflows6 Jul 2026
- 2026Goedel-Code-Prover: Hierarchical Proof Search for Open State-of-the-Art Code Verification18 Mar 2026
- 2026Evaluating LLM-Generated ACSL Annotations for Formal Verification14 Feb 2026
- 2026Doc2Spec: Synthesizing Formal Programming Specifications from Natural Language via Grammar Induction30 Jan 2026
- 2025The 4/δ Bound: Designing Predictable LLM-Verifier Systems for Formal Method Guarantee30 Nov 2025
- 2025LLM For Loop Invariant Generation and Fixing: How Far Are We?9 Nov 2025
- 2025VeriStruct: AI-assisted Automated Verification of Data-Structure Modules in Verus28 Oct 2025
- 2025Quokka: Accelerating Program Verification with LLMs via Invariant Synthesis25 Sep 2025
- 2025Autoformalization in the Era of Large Language Models: A Survey29 May 2025
- 2025Frontier AI's Impact on the Cybersecurity Landscape7 Apr 2025
12 newest of 26 All 26 (JSON)