arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2605.17475cs.SE
收藏

Event-B Agent:迈向LLM代理的正式模型综合与修复

Event-B Agent: Towards LLM Agent for Formal Model Synthesis and Repair

National University of Singapore(新加坡国立大学);East China Normal University(华东师范大学);IRIT - National Polytechnic Institute of Toulouse(图卢兹国立理工学院 IRIT)

Hongshu Wang, Xinyue Zuo, Yuhan Sun, Qin Li, Yamine Ait Ameur, Jin Song Dong

AI总结:

本文提出Event-B Agent,一种基于LLM的正式模型综合与修复框架,通过自然语言要求构建初始模型并迭代修复和优化,提升模型质量。

摘要:

构建通过构造正确的软件是软件工程中的长期目标,因为它在设计和开发过程中确保可靠性,而不是在部署后。形式化方法实现了这一愿景,通过在数学中表达系统行为和需求,从而通过形式验证保证正确性,包括定理证明和模型检查。然而,陡峭的学习曲线和数学专业知识的需求阻碍了形式化方法的广泛应用。大型语言模型(LLMs)最近展示了通过自动形式化弥合这一差距的潜力。然而,现有的基于LLM的方法大多局限于孤立任务,如没有形式化的定理证明或缺乏验证的模型综合。尽管有价值,这些努力并未充分利用一个更全面的框架的潜力,在其中模型和证明相互演变,这一过程密切反映了现实世界的发展实践。为了解决这一差距,我们提出了Event-B Agent,一种受软件设计交织性质启发的新框架。给定自然语言要求,Event-B Agent构建初始模型,并通过形式验证反馈迭代修复和优化它。简化证明消解通过细化,而模型和证明的修复确保每个细化步骤的正确性。共同,这两个组件相互增强,逐步提高模型质量。在不同复杂度的系统上的评估显示,Event-B Agent在端到端的正式模型综合和修复中显著优于基线,同时保持合理的效率。这些结果表明,Event-B Agent是迈向正确通过构造的正式模型综合和修复的有力一步。

英文摘要:

Building software that is correct by construction is a long-standing goal in software engineering, as it ensures reliability during design and development rather than after deployment. Formal methods realize this vision by enabling the expression of system behavior and requirements in mathematics, thereby guaranteeing correctness through formal verification, including theorem proving and model checking. However, the steep learning curve and demand for mathematical expertise hinder the widespread adoption of formal methods. Large language models (LLMs) have recently shown promise in bridging this gap through autoformalization. However, existing LLM-based approaches are largely limited to isolated tasks, such as theorem proving without formalization or model synthesis with insufficient verification. While valuable, these efforts do not fully exploit the potential of a more comprehensive framework in which models and proofs evolve together, a process that closely reflects real-world development practice. To address this gap, we propose Event-B Agent, a novel framework inspired by the interleaved nature of software design. Given natural language requirements, Event-B Agent constructs an initial model and iteratively repairs and refines it using formal verification feedback. Refinement simplifies proof discharge, while repair of models and proofs ensures the soundness of each refinement step. Together, these two components reinforce each other to progressively improve the model quality. Evaluation across systems of varying complexity demonstrates that Event-B Agent substantially outperforms baselines in end-to-end formal model synthesis and repair, while maintaining reasonable efficiency. These results suggest that Event-B Agent is a promising step toward correct-by-construction formal model synthesis and repair.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑