paper-with-me

Papers

Finding Inductive Loop Invariants using Large Language Models

2023-11-14 · Adharsh Kamath, Aditya Senthilnathan, Saikat Chakraborty, Pantazis Deligiannis, Shuvendu K. Lahiri, Akash Lal, Aseem Rastogi, Subhajit Roy, Rahul Sharma

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.

📄 PDF Abstract BibTeX arXiv:2311.07948

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

LLM For Loop Invariant Generation and Fixing: How Far Are We?

2025-11-09 · Mostafijur Rahman Akhond, Saikat Chakraborty, Gias Uddin arxiv

A loop invariant is a property of a loop that remains true before and after each execution of the loop. The identification of loop invariants is a critical step to support automated program safety assessment. Recent adva…

Ranking LLM-Generated Loop Invariants for Program Verification

2023-10-13 · Saikat Chakraborty, Shuvendu K. Lahiri, Sarah Fakhoury, Madanlal Musuvathi 외

Synthesizing inductive loop invariants is fundamental to automating program verification. In this work, we observe that Large Language Models (such as gpt-3.5 or gpt-4) are capable of synthesizing loop invariants for a c…

Re-Ranking

Oasis: ILP-Guided Synthesis of Loop Invariants

2020-10-13 · NeurIPS Workshop CAP 2020 12 · Sahil Bhatia, Saswat Padhi, Nagarajan Natarajan, Rahul Sharma 외

Automated synthesis of inductive invariants is an important problem in software verification. We propose a novel technique that is able to solve complex loop invariant synthesis problems involving large number of variabl…

Not All Invariants Are Equal: Curating Training Data to Accelerate Program Verification with SLMs

2026-03-16 · Ido Pinto, Yizhak Yisrael Elboher, Haoze Wu, Nina Narodytska 외 arxiv

The synthesis of inductive loop invariants remains a critical bottleneck in automated program verification. While Large Language Models (LLMs) show promise in mitigating this issue, they often fail on complex programs, p…

On Scaling Data-Driven Loop Invariant Inference

2019-11-26 · Sahil Bhatia, Saswat Padhi, Nagarajan Natarajan, Rahul Sharma 외

Automated synthesis of inductive invariants is an important problem in software verification. Once all the invariants have been specified, software verification reduces to checking of verification conditions. Although st…