Programmable logic controllers (PLCs) automate industrial processes through repeated scans, each reading inputs, executing control logic, and updating outputs. Engineers write this logic in Structured Text (ST), a high-level textual language defined in IEC 61131-3. Large language models (LLMs) can now generate ST from natural-language requirements, yet compilation success and checks on selected properties or sampled scans can leave behavioral errors undetected. We introduce CycleBench, a benchmark of 301 ST tasks with behavioral requirements, public interfaces, reference programs, and executable scenarios. Its runtime executes each generated program and its reference under aligned inputs, initialization, and logical time, comparing their outputs after every scan. Across eight LLMs and baseline generation methods, execution pass rate trails compilation pass rate by 11.92 percentage points; observed failures include output-update, arithmetic, and timing errors. On fixed traces of programs directly generated by five LLMs, checking outputs only at every fifth scan misses 21.66% of the 157 failures detected by per-scan comparison; across sampling phases, the missed-failure rate ranges from 12.10% to 28.03%. These misses stem from transient output discrepancies, whose detection depends on the sampling phase. Building on this evaluation, we propose CycleGen, which generates multiple candidate ST programs, repairs their compilation errors with bounded compiler feedback, and selects one using runtime self-tests generated in a separate model context. CycleGen improves the execution pass rate over direct generation by 8.68 percentage points. Component ablations distinguish repair and self-test selection; candidate-count analysis shows diminishing returns, with no execution-pass-rate improvement beyond five candidates in our experiments despite 38.8% higher token consumption at eight.


翻译:暂无翻译

0
下载
关闭预览

相关内容

编译器(Compiler),是一种计算机程序,它会将用某种编程语言写成的源代码(原始语言),转换成另一种编程语言(目标语言)。
综述:生成式通信,面向6G的可控生成新范式
专知会员服务
12+阅读 · 7月13日
基于KG+LLM的联合作战计划智能生成方法
专知会员服务
45+阅读 · 2025年1月9日
【2023新书】可编程逻辑控制器,第6版,417页pdf
专知会员服务
39+阅读 · 2023年7月31日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
82+阅读 · 2020年7月26日
基于 Carsim 2016 和 Simulink的无人车运动控制联合仿真(四)
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
【MES】从ERP到MES,大部分企业都会踩到这些坑
产业智能官
23+阅读 · 2018年10月12日
Fully-Convolutional Siamese Networks for Object Tracking论文笔记
统计学习与视觉计算组
10+阅读 · 2018年10月12日
【CPS】社会物理信息系统(CPSS)及其典型应用
产业智能官
16+阅读 · 2018年9月18日
Relation Networks for Object Detection 论文笔记
统计学习与视觉计算组
16+阅读 · 2018年4月18日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
人工智能在军事教育中的应用:若干视角与经验
“星链”减速与不断适应的乌克兰
专知会员服务
2+阅读 · 11月6日
美国中期选举之后:帕兰提尔面临不确定性?
专知会员服务
3+阅读 · 11月6日
《面向国防领域的大语言模型基准测试与适配》
专知会员服务
17+阅读 · 10月28日
世界模型入门:从序贯决策到通用智能体
专知会员服务
19+阅读 · 10月24日
相关资讯
基于 Carsim 2016 和 Simulink的无人车运动控制联合仿真(四)
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
【MES】从ERP到MES,大部分企业都会踩到这些坑
产业智能官
23+阅读 · 2018年10月12日
Fully-Convolutional Siamese Networks for Object Tracking论文笔记
统计学习与视觉计算组
10+阅读 · 2018年10月12日
【CPS】社会物理信息系统(CPSS)及其典型应用
产业智能官
16+阅读 · 2018年9月18日
Relation Networks for Object Detection 论文笔记
统计学习与视觉计算组
16+阅读 · 2018年4月18日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员