arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.07261cs.SE
收藏

利用大语言模型实现离散控制器综合的自动语法错误修复

Automatic Syntax Error Repair for Discrete Controller Synthesis using Large Language Model

Institute of Science Tokyo(东京科学大学);Waseda University(早稻田大学);Kobe University(神户大学)

Yusei Ishimizu, Takuto Yamauchi, Sinan Chen, Jinyu Cai, Jialong Li, Kenji Tei

AI总结:

本文提出利用大语言模型自动修复离散控制器综合模型中的语法错误,通过设计提示策略提高修复准确性和效率,实验显示其比人类开发者快3.46倍。

摘要:

离散控制器综合(DCS)是一种强大的形式化方法,用于自动生成离散事件系统的规范。然而,其实际应用常常受到正式模型在如FSP和FLTL等语言中高度专业化的性质的阻碍。在实践中,建模中的语法错误经常成为开发人员的重要瓶颈——不仅会中断工作流程并降低生产率,还会使开发人员偏离更高层次的语义设计。为此,本文提出了一种自动化方法,利用大语言模型(LLMs)通过精心设计的、基于知识的提示策略来修复DCS模型中的语法错误。具体而言,提示策略源自对常见错误模式的系统经验研究,通过专家访谈和学生研讨会确定。它使LLM具备DCS特定的领域知识,包括形式语法规则和示例,以指导准确的纠正。为了评估我们的方法,我们构建了一个新的基准,通过系统地在经过验证的DCS模型中注入现实的语法错误。定量评估显示,所提出的方法在修复准确性和实际应用方面都非常有效,与人类开发人员相比,速度提高了3.46倍。实验复现套件,包括基准和提示,可在https://github.com/Uuusay1432/DCSModelRepair.git上获得。

英文摘要:

Discrete Controller Synthesis (DCS) is a powerful formal method for automatically generating specifications of discrete event systems. However, its practical adoption is often hindered by the highly specialized nature of formal models written in languages such as FSP and FLTL. In practice, syntax errors in modeling frequently become an important bottleneck for developers-not only disrupting the workflow and reducing productivity, but also diverting attention from higher-level semantic design. To this end, this paper presents an automated approach that leverages Large Language Models (LLMs) to repair syntax errors in DCS models using a well-designed, knowledge-informed prompting strategy. Specifically, the prompting is derived from a systematic empirical study of common error patterns, identified through expert interviews and student workshops. It equips the LLM with DCS-specific domain knowledge, including formal grammar rules and illustrative examples, to guide accurate corrections. To evaluate our method, we constructed a new benchmark by systematically injecting realistic syntax errors into validated DCS models. The quantitative evaluation demonstrates the high effectiveness of the proposed approach in terms of repair accuracy and its practical utility regarding time, achieving a speedup of 3.46 times compared to human developers. The experimental replication suite, including the benchmark and prompts, is available at https://github.com/Uuusay1432/DCSModelRepair.git

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

↑