ChatPaper.aiChatPaper

SemaPLC:PLCコード生成のためのプロジェクト基盤・検証ゲート型エージェントハーネス

SemaPLC: A Project-Grounded, Verification-Gated Agent Harness for PLC Code Generation

August 19, 2026
著者: Yanlun Tu, Huacan Wang, Ziyue Zhou, Jie Zhou, Ningyan Zhu, Ge Chen, Wangyi Chen, Tengfei Zhou, Yifan Zhou, Dasheng Yang, Xiaofeng Mou, Hui Zhang, Yi Xu
cs.AI

要旨

プログラマブルロジックコントローラ(PLC)は産業プラントを稼働させており、大規模言語モデルはそのための独立したプログラム編成ユニット(POU)をすでに生成できる。そうしたロジックが既存のPLCプロジェクトへ統合され、その後正しく動作するかどうかは、限られたテストでしか確認されていない。我々は、従来のツールを組み合わせ、厳格な完了規則によって制御される、プロジェクトに基づく検証ゲート付きエージェントハーネスであるSemaPLCを提案する。モデルが自身の出力を十分と判断した時点で停止するのではなく、SemaPLCは、記録された外部チェックがそれを確認した場合にのみタスク完了を宣言する。これらのチェックは、仕様、コンパイル、およびライブランタイム上の動作を対象とする。既存のベンチマークに対応する117件の独立POUタスクでは、7つのモデルすべてにおいて最高の厳密検証合格率を達成した(平均72.6%)。一方、生成されたロジックが実際のプロジェクト内でコンパイルおよび実行されなければならない65タスクのプロジェクトコンテキストトラックでは、統合コンパイル、静的挙動、動的挙動のすべてで最高平均を達成した。3つの層のうち、動的挙動が最も示唆的である。これは、生成ロジックと参照ロジックをライブPLCランタイムにデプロイし、それらの実行トレースを比較することで測定する。すべての手法は静的スコアでは互いに10ポイント以内に収まるのに対し、動的スコアは、ベースライン群が22.4から31.4であるのに対しSemaPLCが52.2と、手法間を明確に隔てる。全体として、我々の検証ゲート付きハーネスは、すべての層で平均を向上させ、特にランタイムで最も顕著に向上させる。生成された制御ロジックが実際に動作するかどうかの信頼できる試験は、静的評価ではなく実行である。SemaPLCはhttps://github.com/midea-ai/SemaPLCでオープンソースとして公開されている。
English
Programmable logic controllers (PLCs) run industrial plants, and large language models can already generate independent program organization units (POUs) for them. Whether such logic integrates into an existing PLC project and then runs correctly has been checked only in limited tests. We present SemaPLC, a project-grounded and verification-gated agent harness assembled from conventional tools but governed by a strict completion rule. Rather than stopping when the model judges its own output adequate, SemaPLC declares a task complete only when logged external checks confirm it. Those checks cover the specification, the compilation, and the behavior on a live runtime. On 117 independent-POU tasks matching existing benchmarks, it attains the highest strict verified pass rate on all seven models (72.6\% mean). On a project-context track of 65 tasks whose generated logic must compile and run inside a real project, it attains the highest mean on integrated compilation, static behavior, and dynamic behavior. Of the three layers, dynamic behavior is the most revealing. We measure it by deploying the generated and the reference logic to a live PLC runtime and comparing their executed traces. All methods fall within 10 static points of one another, whereas dynamic scores separate them sharply, from 22.4 to 31.4 for the baselines against 52.2 for SemaPLC. Overall, our verification-gated harness raises the mean at every layer and most sharply at runtime. Execution, not static scoring, is the faithful test of whether generated control logic actually works. SemaPLC is open-sourced at https://github.com/midea-ai/SemaPLC.