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.


翻译:循环不变式是推理迭代算法正确性的基础。然而,推导合适的不变式仍然是一项具有挑战性且通常需要人工完成的任务,特别是对于复杂程序。本文提出BALI,一种分支感知框架,通过集成大语言模型(LLMs)来增强循环不变式的推断与验证。我们的方法将自动推理与分支感知的静态程序分析相结合,以提高精确性和可扩展性。具体而言,与先前仅依赖LLM的“猜测-验证”方法不同,BALI首先利用SMT验证分支序列级(路径级)子句,随后将其组合为程序级不变式。我们概述了其关键组件,展示了初步结果,并讨论了未来实现全自动不变式发现的研究方向。

0
下载
关闭预览

相关内容

大语言模型的智能体化推理
专知会员服务
32+阅读 · 1月21日
从感知到推理:深度思考赋能多模态大语言模型
专知会员服务
24+阅读 · 2025年11月19日
大语言模型中的隐式推理:综合综述
专知会员服务
32+阅读 · 2025年9月4日
LlamaV-o1: 重新思考大语言模型中的逐步视觉推理
专知会员服务
17+阅读 · 2025年1月14日
【大模型对齐】利用对齐使大型语言模型更好地推理
专知会员服务
48+阅读 · 2023年9月8日
「大型语言模型推理」综述
专知会员服务
95+阅读 · 2022年12月24日
深入理解BERT Transformer ,不仅仅是注意力机制
大数据文摘
22+阅读 · 2019年3月19日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
关系推理:基于表示学习和语义要素
计算机研究与发展
19+阅读 · 2017年8月22日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
VIP会员
相关VIP内容
大语言模型的智能体化推理
专知会员服务
32+阅读 · 1月21日
从感知到推理:深度思考赋能多模态大语言模型
专知会员服务
24+阅读 · 2025年11月19日
大语言模型中的隐式推理:综合综述
专知会员服务
32+阅读 · 2025年9月4日
LlamaV-o1: 重新思考大语言模型中的逐步视觉推理
专知会员服务
17+阅读 · 2025年1月14日
【大模型对齐】利用对齐使大型语言模型更好地推理
专知会员服务
48+阅读 · 2023年9月8日
「大型语言模型推理」综述
专知会员服务
95+阅读 · 2022年12月24日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员