Litcius/Paper detail

PyLC: A Framework for Transforming and Validating PLC Software using Python and Pynguin Test Generator

Mikael Ebrahimi Salari, Eduard Paul Enoiu, Wasif Afzal, Cristina Seceleanu

202312 citationsDOIOpen Access PDF

Abstract

Many industrial application domains utilize safety-critical systems to implement Programmable Logic Controllers (PLCs) software. These systems typically require a high degree of testing and stringent coverage measurements that can be supported by state-of-the-art automated test generation techniques. However, their limited application to PLCs and corresponding development environments can impact the use of automated test generation. Thus, it is necessary to tailor and validate automated test generation techniques against relevant PLC tools and industrial systems to efficiently understand how to use them in practice. In this paper, we present a framework called PyLC, which handles PLC programs written in the Function Block Diagram and Structured Text languages such that programs can be transformed into Python. To this end, we use PyLC to transform industrial safety-critical programs, showing how our approach can be applied to manually and automatically create tests in the CODESYS development environment. We use behaviour-based, translation rules-based, and coverage-generated tests to validate the PyLC process. Our work shows that the transformation into Python can help bridge the gap between the PLC development tools, Python-based unit testing, and test generation.

Topics & Concepts

Python (programming language)Computer scienceUnit testingProgrammable logic controllerCode coverageProgramming languageBridging (networking)Software engineeringSoftwareOperating systemComputer networkSoftware Testing and Debugging TechniquesSoftware Reliability and Analysis ResearchSoftware Engineering Research