Automatic Syntax Error Repair for Discrete Controller Synthesis using Large Language Model
By: Yusei Ishimizu , Takuto Yamauchi , Sinan Chen and more
Potential Business Impact:
Fixes computer code errors automatically for better designs.
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
Similar Papers
Spec2Control: Automating PLC/DCS Control-Logic Engineering from Natural Language Requirements with LLMs - A Multi-Plant Evaluation
Software Engineering
Automates factory controls from simple instructions.
Can Large Language Models Autoformalize Kinematics?
Logic in Computer Science
AI writes robot instructions from plain English.
LLM-Enhanced Symbolic Control for Safety-Critical Applications
Systems and Control
Teaches robots to follow spoken instructions safely.