ISoLA & AISoLA 2026

International Symposium on Leveraging Applications of Formal Methods, Verification, and Validation • Kos, Greece

Talk

014 – Bridging Function Block Diagrams and Verified Python Code: A Verification-Aware Approach for Programmable Logic Controllers

Time: Sunday, 25.10

Room: Room 2

Authors: Mikael Ebrahimi Salari, Cristina Seceleanu, Eduard Paul Enoiu, Marco Eilers, Alessio Bucaioni, Wasif Afzal

Abstract: Translating programmable logic controller (PLC) programs into analyzable artifacts can enable modern testing and verification techniques in industrial settings. PLC Function Block Diagram (FBD) programs differ from traditional software because they execute cyclically over physical inputs and outputs, combine signal flow with stateful and timed blocks, and depend on scan-cycle semantics, environment assumptions, and block-level abstractions. This paper presents a Python-based verification approach that combines PyLC+, a translation framework for IEC 61131-3 FBDs, with the Nagini verifier. PyLC+ extracts block networks from PLCopen XML and generates executable Python models that preserve the extracted topology, signal flow, and scan-cycle ordering, while making vendor-specific semantics explicit through reconstruction or abstraction. We apply the approach to 13 industrial program organization units (POUs), where 12 are verified against concrete or partially abstracted FBD-derived models, and one against an abstract requirements-level specification. The results provide evidence that automated extraction, manual semantic reconstruction, and contract-based specification can support deductive verification of realistic POU-level models. The guarantees apply to the stated verification models, not to the full original PLC logic including all vendor-specific and timing semantics. We discuss the required abstractions, a Nagini issue exposed by one POU, and missing block semantics that currently limit further automation in PyLC+.

Paper: 978-3-032-40118-2_13