K-ST: A Formal Executable Semantics of PLC Structured Text Language

02/08/2022
by   Kun Wang, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/17/2018

K-Rust: An Executable Formal Semantics for Rust

Rust is a system programming language designed for providing better memo...
research
08/29/2022

Creating Interactive Visualizations of TopHat Programs

Many companies and institutions have automated their business process in...
research
06/10/2020

S-semantics – an example

The s-semantics makes it possible to explicitly deal with variables in p...
research
07/11/2019

Executable formal semantics for the POSIX shell

The POSIX shell is a widely deployed, powerful tool for managing compute...
research
03/30/2022

PLCverif: Status of a Formal Verification Tool for Programmable Logic Controller

Programmable Logic Controllers (PLC) are widely used for industrial auto...
research
10/08/2018

Split-Correctness in Information Extraction

Programs for extracting structured information from text, namely informa...
research
11/16/2020

A Modern Compiler for the French Tax Code

In France, income tax is computed from taxpayers' individual returns, us...

Please sign up or login with your details

Forgot password? Click here to reset