FAILURE MAP
← Case archive

FA-92165 / PLC ladder logic scan cycles / Member archive

FIFO load overwrites the newest entry when full · case 05

A part queued while the FIFO is full replaces the last queued part instead of being rejected.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

FIFO load (FFL) and unload (FFU) pair on one file of the given length. ops is a list of [op, value], one triggered instruction per scan. Load stores value at the position and increments it; when full (position == length) the load is ignored. Unload moves element 0 to dest, shifts the file toward 0 and zeroes the vacated last element; unloading an empty FIFO leaves dest unchanged. DN is position >= length and EM is position == 0. Return [position, dest, DN, EM, file] per scan.

Why this case matters

Ladder programs are executed as repeated scans; each defect here changes what a rung, timer, counter or data-table instruction reports on a particular scan, which is how commissioning and field faults are actually observed.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: scenario 5[[1, 0, false, false, [7, 0]], [2, 0, true, false, [7, 5]], [1, 7, false, false, [5, 0]], [2, 7, true, false, [5, 47]], [2, 7, true, false, [5, 60]], [1, 5, false, false, [60, 0]], [2, 5, true, false, [60, 8]], [2, 5, true, false, [60, 74]], [1, 60, false, false, [74, 0]], [2, 60, true, false, [74, 39]], [2, 60, true, false, [74, 17]]][[1, 0, false, false, [7, 0]], [2, 0, true, false, [7, 5]], [1, 7, false, false, [5, 0]], [2, 7, true, false, [5, 47]], [2, 7, true, false, [5, 47]], [1, 5, false, false, [47, 0]], [2, 5, true, false, [47, 8]], [2, 5, true, false, [47, 8]], [1, 47, false, false, [8, 0]], [2, 47, true, false, [8, 39]], [2, 47, true, false, [8, 39]]]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗