EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

Beyond Compilation with Runtime Diagnosis and Repair of Function Block Diagrams Generated by LLMs

Qunxin Liu, Jun Lin, Hao Yuan, Yue Liu, Yuyi Wang

Electronics · 02.11.2026 · 15 (21) · 5079

DOI: 10.3390/electronics15215079 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Electronics, online erschienen am 02.11.2026. Verfasst von Qunxin Liu und 4 weiteren Autor:innen. Die Arbeit nennt 26 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0).

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Function Block Diagrams (FBDs) generated by large language models (LLMs) can compile in an industrial integrated development environment (IDE) while still violating the intended control behavior. We present a runtime diagnosis and repair pipeline that connects a topology with typed pins, PLCopen XML import, CODESYS compilation, and SoftPLC execution. The pipeline returns structured compilation diagnostics and runtime state observations that guide localized repair. Across a benchmark of 20 cases, the full configuration achieves 20/20 compilations on the first pass, compared with 8/20 without retrieval and 5/20 for a naive baseline. Repair raises the setting without retrieval to 13/20 within five attempts. The ablation shows that retrieved function block interfaces are the main driver of first pass compilation, while repair provides complementary recovery. For runtime evidence, a compiled pump cascade program initially passed 2 of 6 diagnostic assertions. After two cycles of diagnosis and repair, it passed all 18 assertions in an expanded final verification suite. Across the benchmark suite, 118/118 executed assertions derived from requirements were satisfied after repair. A targeted defect injection study detected 7/8 defects not visible at compilation across four mechanisms. These results demonstrate a practical path for compiling, testing, and repairing control logic generated through FBD workflows.

Zitieren

APA

Liu, Q., Lin, J., Yuan, H., Liu, Y., & Wang, Y. (2026). Beyond Compilation with Runtime Diagnosis and Repair of Function Block Diagrams Generated by LLMs. Electronics, 15(21), 5079. https://doi.org/10.3390/electronics15215079

Vancouver

Liu Q, Lin J, Yuan H, Liu Y, Wang Y. Beyond Compilation with Runtime Diagnosis and Repair of Function Block Diagrams Generated by LLMs. Electronics. 2026;15(21):5079. doi:10.3390/electronics15215079

BibTeX
@article{Liu2026,
  author = {Liu, Qunxin and Lin, Jun and Yuan, Hao and Liu, Yue and Wang, Yuyi},
  title = {Beyond Compilation with Runtime Diagnosis and Repair of Function Block Diagrams Generated by LLMs},
  journal = {Electronics},
  year = {2026},
  volume = {15},
  number = {21},
  pages = {5079},
  doi = {10.3390/electronics15215079}
}
Kostenlos starten →