ESBMC-Arduino: Closing the Deployment Gap for Formal Verification of Open-Hardware PLCs

2026-07-09Programming Languages

Programming LanguagesHardware Architecture
AI summary

The authors studied how verifying safety in industrial control programs can fail when ignoring real hardware limits, like the sensor input range and word size on small microcontrollers. They found that previous tools raised many false alarms by considering sensor values that real devices could never produce. To fix this, they created a hardware-faithful method that models actual sensor and arithmetic limits, reducing false alarms while still detecting real bugs. They demonstrated their approach on Arduino-based programs, showing it improves verification accuracy by matching the real hardware behavior.

IEC 61131-3microcontrollerverificationoverflowanalog-to-digital converter (ADC)hardware abstraction layer (HAL)ESBMCArduinofinite word sizeindustrial control systems
Authors
Pierre Dantas, Lucas Cordeiro, Waldir Junior
Abstract
OpenPLC, Arduino OPTA, CONTROLLINO, and Industrial Shields M-Duino bring IEC 61131-3 to low-cost microcontrollers used in real automation and industrial control system (ICS) security research. Existing open-source verifiers for IEC 61131-3, including ESBMC-PLC, prove safety over an abstract scan-cycle model with idealized unbounded integers. The board artifact runs on a resource-constrained microcontroller unit (MCU) with 16-bit words (8-bit AVR Arduinos), and sensors are read via a finite-resolution analog-to-digital converter (ADC). We show this deployment gap makes naive width-aware verification unsound: across 123 real programs, checking 16-bit overflow without a hardware input model yields 44% false alarms (54/123) and finds no genuine defects, because it explores sensor values no ADC can produce. Since the gap lies where computation meets the physical process - a bounded sensor reading scaled by finite-width arithmetic into an actuation command - an overflow can silently suppress a safety action, such as a high-level alarm. An unbounded input model fabricates alarms that no environment can trigger. We present hardware-faithful verification for IEC 61131-3 on open hardware: a declarative hardware abstraction layer (HAL) descriptor (width, ADC/PWM resolution, I/O binding) and a sound lowering that interprets arithmetic at target width and constrains inputs to hardware-realizable ranges. We instantiate it for Arduino as ArduinoTool, deriving HAL parameters from official cores and realizing the input-range model in the ESBMC Ladder Diagram (LD) frontend. On the 123-program corpus, the HAL annotator eliminates all 54 false alarms while preserving robustness proofs, and a controlled corpus demonstrates the rare width-dependent defects it detects with realizable witnesses.