paperbot · PL 论文追踪

全部论文 待读 收藏

P0 LLM-Generated Invariants for Bounded Model Checking Without Loop Unrolling

无循环展开的有界模型检测中由LLM生成的循环不变式
ASE Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering2024匹配度 9/10 · 该论文属于“AI→PL”方向,直接用LLM生成循环不变式并借助一阶定理证明器保证可靠性,从而改进有界模型检测/形式化验证,与用户关注LLM/Agent改进静态分析与形式化验证的核心问题高度一致。论文还结合工业级验证器ESBMC进行工程落地和对比实验,符合用户偏好的理论形式化与工程实现兼具、问题驱动的研究。引用 39 inbox
Muhammad A. A. Pirzada, Giles Reger, Ahmed Bhayat, Lucas C. Cordeiro
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:用LLM生成循环不变式并由一阶定理证明器校验,从而在CFG层面消除循环,扩展有界模型检测对无界循环程序的验证能力。

经典有界模型检测(BMC)通常通过循环展开来处理程序中的循环,这限制了对无界循环程序的验证能力。本文研究一种改进的BMC流程:不再展开循环,而是修改控制流图(CFG),将表示循环的CFG片段替换为一个断言该循环不变式的节点。作者利用大语言模型(LLM)生成这些循环不变式,并使用一阶定理证明器验证所生成断言语句的正确性,从而以可靠(sound)的方式将程序转化为无循环变体。基于该方法的工具ESBMC ibmc在实验评估中表现出与当前最先进形式验证器相当的竞争力,显著提升了工业级软件验证器ESBMC可验证的程序数量,并成功验证了SeaHorn和VeriAbs等先进验证器无法验证的一些程序。

问题
经典有界模型检测依赖循环展开,难以有效验证含有无界循环的程序;如何在保证可靠性的前提下避免循环展开是关键问题。
方法
通过修改控制流图,将循环区域替换为断言循环不变式的节点;使用LLM生成不变式候选,并用一阶定理证明器校验其正确性,从而把程序可靠地转化为无循环变体。
评估
在含无界循环的程序上,将工具ESBMC ibmc与ESBMC、SeaHorn、VeriAbs等最先进形式验证器进行对比,结果显示其显著增加了ESBMC成功验证的程序数量,并能验证其他先进工具无法验证的程序。
原文摘要(Abstract)

We investigate a modification of the classical Bounded Model Checking (BMC) procedure that does not handle loops through unrolling but via modifications to the control flow graph (CFG). A portion of the CFG representing a loop is replaced by a node asserting invariants of the loop. We generate these invariants using Large Language Models (LLMs) and use a first-order theorem prover to ensure the correctness of the generated statements. We thus transform programs to loop-free variants in a sound manner. Our experimental results show that the resulting tool, ESBMC ibmc, is competitive with state-of-the-art formal verifiers for programs with unbounded loops, significantly improving the number of programs verified by the industrial-strength software verifier ESBMC and verifying programs that state-of-the-art software verifiers such as SeaHorn and VeriAbs could not.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{PirzadaRBC24,
  title = {LLM-Generated Invariants for Bounded Model Checking Without Loop Unrolling},
  author = {Muhammad A. A. Pirzada and Giles Reger and Ahmed Bhayat and Lucas C. Cordeiro},
  booktitle = {ASE},
  year = {2024},
  doi = {10.1145/3691620.3695512}
}