计算机科学 > 程序设计语言
[提交于 2025年12月31日]
标题:BALI: Branch-Aware Loop Invariant Inference with Large Language Models
查看中文 PDF 查看原文 PDF EasyResearch 阅读摘要:Loop invariants are fundamental for reasoning about the correctness of iterative algorithms. However, deriving suitable invariants remains a challenging and often manual task, particularly for complex programs. In this paper, we introduce BALI, a branch-aware framework that integrates large language models (LLMs) to enhance the inference and verification of loop invariants. Our approach combines automated reasoning with branch-aware static program analysis to improve both precision and scalability. Specifically, unlike prior LLM-only guess-and-check methods, BALI first verifies branch-sequence-level (path-level) clauses with SMT and then composes them into program-level invariants. We outline its key components, present preliminary results, and discuss future directions toward fully automated invariant discovery.
提交历史
来自:Mingxiu Wang[v1] 2025年12月31日 星期三 07:13:42 UTC