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 작업에서 SemaPLC는 7개 모델 전체에서 최고의 엄격한 검증 통과율(평균 72.6%)을 달성한다. 생성된 로직이 실제 프로젝트 내에서 컴파일되고 실행되어야 하는 65개 작업의 프로젝트 컨텍스트 트랙에서는 통합 컴파일, 정적 동작 및 동적 동작에서 최고 평균을 달성한다. 세 계층 중에서 동적 동작이 가장 결정적이다. 우리는 생성된 로직과 참조 로직을 실시간 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.