paperbot · PL 论文追踪

全部论文 待读 收藏

P2 AutoPLC: Generating Vendor-Aware Structured Text for Programmable Logic Controllers

AutoPLC:为可编程逻辑控制器生成厂商感知的结构化文本
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 3/10 · 论文将 LLM 用于 PLC 结构化文本代码生成,属于程序合成与工业领域代码生成,与你关注的核心方向(静态分析、形式化验证、浮点程序分析、贝叶斯程序分析及其与 LLM 的交叉)重合度较低;虽具备工业落地与 benchmark 亮点,但未涉及程序分析或验证方法。引用 3 inbox
Donghao Yang, Aolang Wu, Tianyi Zhang, Li Zhang, Xiaoli Lian, Fang Liu, Yuming Ren, Jiaji Tian, Xiaoyin Che
crossref: 2026-09-12

AI 速览

一句话:提出 AutoPLC,通过厂商知识库与四阶段 LLM 流程,从自然语言需求自动生成可编译的厂商感知 PLC 结构化文本代码。

PLC 的结构化文本(ST)因表达力强被广泛采用,但各厂商私有扩展与硬件库造成平台碎片化,工程师跨平台需重新学习实现细节。本文提出 AutoPLC,从自然语言需求自动生成厂商感知的 ST 代码。它先构建厂商专属 API 库与标注案例库,再以四阶段流程生成代码:分步规划(轻量自然语言状态机支持控制逻辑)、基于 LLM 重排的案例检索、工业数据引导的 API 推荐,以及与厂商 IDE 动态交互验证。在 Siemens TIA Portal 与 CODESYS 上实现,914 任务基准编译成功率超 90%,优于基线,平均每任务成本 0.13 美元;资深 PLC 工程师积极评价其生成代码的实用性。

问题
PLC 结构化文本生态被厂商私有扩展和硬件库割裂,工程师跨平台复用和迁移代码困难,且从自然语言需求到可编译 ST 代码仍依赖人工。
方法
AutoPLC 结合厂商专属 API 库与标注案例库,采用分步规划、LLM 重排检索、API 推荐和 IDE 动态验证的四阶段流程,从自然语言需求生成厂商感知的 ST 代码。
评估
在 Siemens TIA Portal 与 CODESYS 的 914 任务基准上,编译成功率超过 90%,优于所有对比基线,平均每任务成本 0.13 美元,并由资深 PLC 工程师评估实用性。
原文摘要(Abstract)

Among the programming languages for Programmable Logic Controllers (PLCs), Structured Text (ST) is widely adopted for industrial automation due to its expressiveness and flexibility. However, major vendors implement ST with proprietary extensions and hardware-specific libraries - Siemens’ SCL and CODESYS’ ST each differ in syntax and functionality. This fragmentation forces engineers to relearn implementation details across platforms, creating substantial productivity barriers. To address this challenge, we developed AutoPLC, a framework capable of automatically generating vendor-aware ST code directly from natural language requirements. Our solution begins by building two essential knowledge sources tailored to each vendor’s specifications: a structured API library containing platform-exclusive functions, and an annotated case database that captures real-world implementation experience. Building on these foundations, we created a four-stage generation process that combines step-wise planning (enhanced with a lightweight natural language state machine support for control logic), contextual case retrieval using LLM-based reranking, API recommendation guided by industrial data, and dynamic validation through direct interaction with vendor IDEs. Implemented for Siemens TIA Portal and the CODESYS platform, AutoPLC achieves 90%+ compilation success on our 914-task benchmark (covering general-purpose and process control functions), outperforming all selected baselines, at an average cost of only $0.13 per task. Experienced PLC engineers positively assessed the practical utility of the generated code, including cases that failed compilation.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9318,
  title = {AutoPLC: Generating Vendor-Aware Structured Text for Programmable Logic Controllers},
  author = {Donghao Yang and Aolang Wu and Tianyi Zhang and Li Zhang and Xiaoli Lian and Fang Liu and Yuming Ren and Jiaji Tian and Xiaoyin Che},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00297}
}