Skip to content

Benchmarks

building lighting interlock (graphical LD)

suite id g_building_lighting
domain building_automation
language LD-graphical
difficulty easy
validation status validated
origin authored
license CC-BY-4.0

Authored for this suite to cover this domain with genuine control logic

What is proved

From benchmarks/building_automation/g_building_lighting/props.yaml. What each kind claims, and what it becomes on either route, is on The properties we prove.

id kind claim requirement
P1 invariant !(lights && master_off) The master-off override must always de-energise the lights.

Variants

file expected verdict violates method
clean.xml SAFE none expert
bomb.xml VIOLATION P1 fault-injection

Files

file what it is size sha256
benchmark.yml benchmark metadata 1.0 KB e6f20be95811
bomb.xml ladder program, PLCopen XML 2.9 KB ece12b8ea4f8
clean.xml ladder program, PLCopen XML 2.5 KB 71cfd8e23ec1
props.yaml property file 0.2 KB 451215a5a0e1

Structured text, derived

Read off the ladder graph by runner/ld_to_st.py: every rung's contacts and coils rewritten as IEC 61131-3 assignments, in the same series/parallel logic the PLCopen XML encodes. This is a reading aid, not a second source of expected verdicts; ESBMC verifies the ladder program shown above, never this rendering.

PROGRAM g_building_lighting_bomb
VAR_INPUT
    demand : BOOL;
    master_off : BOOL;
    maint : BOOL;
END_VAR

VAR_OUTPUT
    lights : BOOL;
    setback : BOOL;
END_VAR


lights := ((NOT master_off OR (master_off AND maint)) AND demand);
setback := master_off;

END_PROGRAM
PROGRAM g_building_lighting_clean
VAR_INPUT
    demand : BOOL;
    master_off : BOOL;
    maint : BOOL;
END_VAR

VAR_OUTPUT
    lights : BOOL;
    setback : BOOL;
END_VAR


lights := (NOT master_off AND demand);
setback := master_off;

END_PROGRAM

Recorded runs

A task can carry two routes. ld is ESBMC's ladder front end reading the program directly. via C is the same solver reached through Beremiz and MatIEC, which is the only route that reaches ST, IL, FBD and SFC; see How ESBMC-PLC works.

  • g_building_lighting__bomb (props.yaml, expected VIOLATION): v8.4 VIOLATION
  • g_building_lighting__bomb__viac via C (props.yaml, expected VIOLATION): master VIOLATION
  • g_building_lighting__clean (props.yaml, expected SAFE): v8.4 SAFE
  • g_building_lighting__clean__viac via C (props.yaml, expected SAFE): master SAFE