You are required to read and agree to the below before accessing a full-text version of an article in the IDE article repository.
The full-text document you are about to access is subject to national and international copyright laws. In most cases (but not necessarily all) the consequence is that personal use is allowed given that the copyright owner is duly acknowledged and respected. All other use (typically) require an explicit permission (often in writing) by the copyright owner.
For the reports in this repository we specifically note that
- the use of articles under IEEE copyright is governed by the IEEE copyright policy (available at http://www.ieee.org/web/publications/rights/copyrightpolicy.html)
- the use of articles under ACM copyright is governed by the ACM copyright policy (available at http://www.acm.org/pubs/copyright_policy/)
- technical reports and other articles issued by M‰lardalen University is free for personal use. For other use, the explicit consent of the authors is required
- in other cases, please contact the copyright owner for detailed information
By accepting I agree to acknowledge and respect the rights of the copyright owner of the document I am about to access.
If you are in doubt, feel free to contact webmaster@ide.mdh.se
A Verification-Aware Pipeline for Programmable Logic Controllers: From Function Block Diagrams to Verified Python Code
Publication Type:
Report - MRTC
Venue:
Mälardalen Real-Time Research Centre 2025
Publisher:
Mälardalen Real-Time Research Centre, Mälardalen University
ISRN:
MDH-MRTC-356/2025-1-SE
Abstract
Translating programmable logic controller (PLC) programs into analyzable software artifacts is an important step toward enabling modern software testing and verification techniques in industrial settings. This paper presents a replication study in which we use PyLC+, a translation framework for IEC 61131-3 Function Block Diagrams (FBD), together with the Nagini verifier to perform functional correctness checks on industrial safety-critical logic. PyLC+ extracts block networks from PLCopen XML and generates executable Python models that preserve block semantics, signal flow, and scan-cycle behavior.
We applied this workflow to a representative set of 13 industrial POUs from an electropneumatic brake control subsystem. All 13 POUs were verified: twelve using concrete or partially abstracted FBD models, and one using an abstract requirements-level specification whose 7-tuple specification initially exposed a bug in the Nagini verifier (a lack of support for tuples with more than six elements), which was fixed by the Nagini developers.
The results show that a combination of automated extraction, manual semantic reconstruction, and contract-based specification is sufficient to verify realistic industrial logic at the POU level. We also discuss the abstraction decisions, the Nagini bug uncovered by one POU, and the remaining missing block semantics that constrain how far automation can be pushed in future versions of PyLC+.
Bibtex
@techreport{Ebrahimi Salari7311,
author = {Mikael Ebrahimi Salari and Eduard Paul Enoiu and Cristina Seceleanu and Marco Eilers and Alessio Bucaioni and Wasif Afzal},
title = {A Verification-Aware Pipeline for Programmable Logic Controllers: From Function Block Diagrams to Verified Python Code},
month = {December},
year = {2025},
publisher = {M{\"a}lardalen Real-Time Research Centre, M{\"a}lardalen University},
url = {http://www.es.mdu.se/publications/7311-}
}