Skip to content

Benchmarks

batch reactor interlock (graphical LD)

suite id g_batch_reactor
domain chemical_batch
language LD-graphical
difficulty medium
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/chemical_batch/g_batch_reactor/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 !(feed_valve && overpressure) The feed valve must never open while the reactor is over-pressure.

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 bf7dcf012d64
bomb.xml ladder program, PLCopen XML 3.2 KB 5534627f0e55
clean.xml ladder program, PLCopen XML 2.7 KB 24b9dfb45c23
props.yaml property file 0.2 KB c0e51b86cfa8
weakened.props.yaml property file 0.5 KB d3b5631b36ec

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_batch_reactor_bomb
VAR_INPUT
    feed_cmd : BOOL;
    overpressure : BOOL;
    enable : BOOL;
    maint : BOOL;
END_VAR

VAR_OUTPUT
    feed_valve : BOOL;
    vent : BOOL;
END_VAR


feed_valve := (((NOT overpressure OR (overpressure AND maint)) AND feed_cmd) AND enable);
vent := overpressure;

END_PROGRAM
PROGRAM g_batch_reactor_clean
VAR_INPUT
    feed_cmd : BOOL;
    overpressure : BOOL;
    enable : BOOL;
    maint : BOOL;
END_VAR

VAR_OUTPUT
    feed_valve : BOOL;
    vent : BOOL;
END_VAR


feed_valve := ((NOT overpressure AND feed_cmd) AND enable);
vent := overpressure;

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.

  • batch_reactor_weakened (weakened.props.yaml, expected VIOLATION): master SAFE
  • g_batch_reactor__bomb (props.yaml, expected VIOLATION): v8.4 VIOLATION
  • g_batch_reactor__bomb__viac via C (props.yaml, expected VIOLATION): master VIOLATION
  • g_batch_reactor__clean (props.yaml, expected SAFE): v8.4 SAFE
  • g_batch_reactor__clean__viac via C (props.yaml, expected SAFE): master SAFE