arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2202.04076cs.PLcs.SE
收藏

K-ST:用于 PLC 的 Structured Text 语言的形式化可执行语义

K-ST: A Formal Executable Semantics of the Structured Text Language for PLCs

Kun Wang, Jingyi Wang, Christopher M. Poskitt, Xiangxiang Chen, Jun Sun, Peng Cheng

AI总结:

针对 PLC 的 Structured Text 缺乏形式化语义的问题,基于 K 框架开发了符合 IEC 61131-3 标准的可执行语义 K-ST,并借此验证商业编译器与 OpenPLC 平台,发现了 5 个错误和 9 个功能缺陷。

摘要:

可编程逻辑控制器(PLCs)负责许多工业系统(例如制造业和公共基础设施)中的自动化过程控制,因此确保其正确且安全地运行至关重要。大多数 PLC 使用诸如 Structured Text(ST)等语言进行编程。然而,形式化语义的缺失使得难以确定各供应商不同的翻译器和编译器的正确性。在本研究中,我们开发了 K-ST,即在 K 框架中 ST 的形式化可执行语义。K-ST 根据 IEC 61131-3 标准和 PLC 供应商手册定义,是一种高级参考语义,可用于评估不同 ST 实现的正确性和一致性。我们通过执行从 Github 提取的 509 个 ST 程序并将结果与现有商业编译器(即 CODESYS、CX-Programmer 和 GX Works2)进行比较来验证 K-ST。然后,我们应用 K-ST 验证开源 OpenPLC 平台的实现,通过比较多个测试程序的执行情况,发现了编译器中的 5 个错误和 9 个功能缺陷。

英文摘要:

Programmable Logic Controllers (PLCs) are responsible for automating process control in many industrial systems (e.g. in manufacturing and public infrastructure), and thus it is critical to ensure that they operate correctly and safely. The majority of PLCs are programmed in languages such as Structured Text (ST). However, a lack of formal semantics makes it difficult to ascertain the correctness of their translators and compilers, which vary from vendor-to-vendor. In this work, we develop K-ST, a formal executable semantics for ST in the K framework. Defined with respect to the IEC 61131-3 standard and PLC vendor manuals, K-ST is a high-level reference semantics that can be used to evaluate the correctness and consistency of different ST implementations. We validate K-ST by executing 509 ST programs extracted from Github and comparing the results against existing commercial compilers (i.e., CODESYS, CX-Programmer, and GX Works2). We then apply K-ST to validate the implementation of the open source OpenPLC platform, comparing the executions of several test programs to uncover five bugs and nine functional defects in the compiler.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑