A Python tool for static analysis of IEC 61131-3 Structured Text (ST) code. It parses PLC logic into an XML Abstract Syntax Tree (AST) and generates Program Dependency Graphs (PDGs) and Invariant Templates for safety verification.
- ST Parser: Converts Structured Text source code into a standardized XML AST.
- Static Analysis: Builds Program Dependency Graphs (PDG) mapping control and data flow.
- Invariant Extraction: Automatically identifies safety invariant templates:
- Single-Variable:
H_Sensor > 100 -> Valve = FALSE - Multi-Variable:
IF Sensor + Offset > Limit THEN Actuate - Inter-State: Logic governing valid state transitions.
- Single-Variable:
- Variable Classification: Automatically detects Sensing, Actuation, and Configuration variables.
Requires Python 3.13+.
Using uv (Recommended):
uv venv
source .venv/bin/activate
uv sync