← Latest papers
💬 NLP

ESBMC-PLC: Formal Verification of IEC 61131-3 Ladder Diagram Programs Using SMT-Based Model Checking

This paper introduces ESBMC-PLC, the first open-source formal verifier that natively supports IEC 61131-3 Ladder Diagram programs by translating them into an intermediate representation for SMT-based model checking, thereby successfully verifying safety properties and detecting bugs in diverse industrial benchmarks while addressing key research gaps in the field.

Original authors: Pierre Dantas, Lucas Cordeiro, Waldir Junior

Published 2026-06-16
📖 4 min read☕ Coffee break read

Original authors: Pierre Dantas, Lucas Cordeiro, Waldir Junior

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine a factory floor where giant machines, chemical mixers, and train signals are controlled by a tiny, tireless brain called a PLC (Programmable Logic Controller). These machines run on a special kind of instruction manual called a Ladder Diagram. Think of it like a drawing of a ladder where every "rung" is a rule: "If the red light is on AND the button is pressed, then turn on the motor."

For decades, engineers have written these rules by drawing them, not by typing code. This made it very hard for modern "safety inspectors" (formal verification tools) to check if the rules were perfect, because the inspectors only understood typed code, not drawings.

This paper introduces ESBMC-PLC, a new tool that acts like a universal translator and a super-strict safety inspector rolled into one.

Here is how it works, using simple analogies:

1. The Translator (The "Rosetta Stone")

Before this tool, you couldn't ask a computer to check a drawing. ESBMC-PLC takes the graphical "Ladder Diagram" (the drawing) and instantly translates it into a language the computer understands (a text-based intermediate code).

  • The Analogy: Imagine you have a recipe written in a sketchbook with pictures of ingredients. ESBMC-PLC is the chef who looks at the pictures and instantly writes out the exact text instructions: "Add 2 cups of flour, then stir." Now, the computer can read the recipe.

2. The Simulator (The "Time-Traveling Loop")

A PLC doesn't just run once; it runs in a loop, checking sensors and changing outputs thousands of times a second.

  • The Analogy: Most safety checks look at a single moment in time. ESBMC-PLC is like a time-traveling simulator that runs the factory's "day" over and over again. But instead of just replaying one specific day, it simulates every possible day at once. It asks: "What if the sensor breaks? What if the button is pressed twice? What if the power flickers?" It checks every single combination of events to see if a disaster can happen.

3. The "Unbounded" Proof (The "Forever Guarantee")

Old tools could only check a limited number of steps (like checking the first 100 days of a factory's life). If a bug happened on day 101, they would miss it.

  • The Analogy: ESBMC-PLC uses a special math trick called k-induction. Instead of counting days one by one, it proves a rule that says, "If the factory is safe today, and the rules are followed, it will be safe tomorrow, and the day after, and forever." It gives a forever guarantee that the machine will never crash, provided the rules are followed.

4. The "No-Logic" Language (The "Plain English" Checklist)

Usually, to ask a computer to check safety, you had to know complex math logic (temporal logic).

  • The Analogy: ESBMC-PLC lets engineers write safety rules in a simple YAML checklist (like a to-do list).
    • Instead of: "For all time t, if A is true then B must be false."
    • You write: "The motor and the reverse switch must never be on at the same time."
      The tool understands this plain English and checks it automatically.

What Did They Find?

The authors tested this tool on 13 different factory programs, ranging from simple motor controls to complex traffic lights and water pumps. They used programs from real-world vendors (like CONTROLLINO and MathWorks) that were not designed to be tested, just to see if the tool could handle them.

  • The Results:
    • 100% Accuracy: It correctly identified every safe program and every unsafe program.
    • Found Hidden Bugs: It found 8 specific bugs that standard testing missed. For example, it found a scenario where an emergency stop button would turn off the machine but fail to reset a timer, causing the machine to restart immediately when the button was released.
    • Speed: It checked all these programs in less than 60 milliseconds (faster than a human blink).

The Bottom Line

This paper presents the first open-source tool that can take a standard industrial drawing (Ladder Diagram), translate it, and mathematically prove it is safe forever. It bridges the gap between the old-school graphical way engineers design machines and the high-tech math way computers verify safety.

Important Note: The paper claims this works for the specific "core" parts of industrial programming (Boolean logic, timers, counters). It does not yet handle complex features like floating-point numbers or advanced data arrays, but for the vast majority of safety-critical logic, it works perfectly and is ready for use today.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →