FA-67206 / Railway interlocking logic / Open access
Call-on permissive move authorisation: stationary requirement · case 01
A call-on is given to a train still rolling towards the signal.
ROOT CAUSE
The call-on speed limit is used where standstill is required.
THE FAILURE
The call-on speed limit is used where standstill is required.
Unsuccessful approach: Tolerating speeds under 5 km/h still authorises a creeping train.
Case contract
Without a route the answer is none. With the section ahead clear the main aspect is given. Into an occupied section a call-on is given only if the train has stood at the signal for at least 120 s and is stationary (0 km/h), the gap to the standing train is at least 20 m and that train is not moving; otherwise none.
Why this case matters
Interlocking logic decides whether trains may be given authority; a wrong decision at this point either grants unsafe movements or strands traffic.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
if not x['route_set']:
return 'none'
if not x['ahead_occupied']:
return 'main'
if x['stand_s'] < 120 or x['speed_kmh'] > 15:
return 'none'
if x['gap_m'] < 20:
return 'none'
if x['platform_train_moving']:
return 'none'
return 'call-on'
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: creeping at walking pace', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 3, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('sampled regression 25', {'route_set': True, 'ahead_occupied': True, 'stand_s': 120, 'speed_kmh': 15, 'gap_m': 21, 'platform_train_moving': False}, 'none'), ('boundary: stood exactly two minutes', {'route_set': True, 'ahead_occupied': True, 'stand_s': 120, 'speed_kmh': 0, 'gap_m': 100, 'platform_train_moving': False}, 'call-on'), ('boundary: stood one second short', {'route_set': True, 'ahead_occupied': True, 'stand_s': 119, 'speed_kmh': 0, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('regression: rolling at call-on speed', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 12, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('control 1', {'route_set': True, 'ahead_occupied': False, 'stand_s': 300, 'speed_kmh': 0, 'gap_m': 60, 'platform_train_moving': False}, 'main'), ('control 4', {'route_set': True, 'ahead_occupied': True, 'stand_s': 120, 'speed_kmh': 3, 'gap_m': 200, 'platform_train_moving': True}, 'none'), ('control 7', {'route_set': True, 'ahead_occupied': True, 'stand_s': 120, 'speed_kmh': 3, 'gap_m': 19, 'platform_train_moving': False}, 'none')], [('regression: rolling at call-on speed', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 12, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('regression: creeping at walking pace', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 3, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('boundary: platform train moving far away', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 0, 'gap_m': 200, 'platform_train_moving': True}, 'none'), ('boundary: platform train moving close by', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 0, 'gap_m': 30, 'platform_train_moving': True}, 'none'), ('boundary: gap exactly at the minimum', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 0, 'gap_m': 20, 'platform_train_moving': False}, 'call-on'), ('control 12', {'route_set': True, 'ahead_occupied': True, 'stand_s': 300, 'speed_kmh': 0, 'gap_m': 5, 'platform_train_moving': False}, 'none'), ('control 15', {'route_set': True, 'ahead_occupied': True, 'stand_s': 119, 'speed_kmh': 20, 'gap_m': 19, 'platform_train_moving': True}, 'none'), ('control 18', {'route_set': True, 'ahead_occupied': True, 'stand_s': 0, 'speed_kmh': 0, 'gap_m': 20, 'platform_train_moving': True}, 'none')], [('regression: creeping at walking pace', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 3, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('sampled regression 5', {'route_set': True, 'ahead_occupied': True, 'stand_s': 121, 'speed_kmh': 10, 'gap_m': 200, 'platform_train_moving': False}, 'none'), ('boundary: platform train moving far away', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 0, 'gap_m': 200, 'platform_train_moving': True}, 'none'), ('boundary: platform train moving close by', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 0, 'gap_m': 30, 'platform_train_moving': True}, 'none'), ('boundary: gap exactly at the minimum', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 0, 'gap_m': 20, 'platform_train_moving': False}, 'call-on'), ('control 23', {'route_set': True, 'ahead_occupied': True, 'stand_s': 30, 'speed_kmh': 15, 'gap_m': 200, 'platform_train_moving': False}, 'none'), ('control 26', {'route_set': False, 'ahead_occupied': True, 'stand_s': 120, 'speed_kmh': 0, 'gap_m': 19, 'platform_train_moving': False}, 'none'), ('control 29', {'route_set': True, 'ahead_occupied': True, 'stand_s': 30, 'speed_kmh': 20, 'gap_m': 19, 'platform_train_moving': False}, 'none')], [('regression: rolling at call-on speed', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 12, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('regression: creeping at walking pace', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 3, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('sampled regression 76', {'route_set': True, 'ahead_occupied': True, 'stand_s': 300, 'speed_kmh': 10, 'gap_m': 20, 'platform_train_moving': False}, 'none'), ('boundary: gap exactly at the minimum', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 0, 'gap_m': 20, 'platform_train_moving': False}, 'call-on'), ('boundary: clear platform for a moving train', {'route_set': True, 'ahead_occupied': False, 'stand_s': 0, 'speed_kmh': 40, 'gap_m': 100, 'platform_train_moving': False}, 'main'), ('control 34', {'route_set': True, 'ahead_occupied': True, 'stand_s': 120, 'speed_kmh': 20, 'gap_m': 60, 'platform_train_moving': False}, 'none'), ('control 37', {'route_set': True, 'ahead_occupied': True, 'stand_s': 0, 'speed_kmh': 20, 'gap_m': 19, 'platform_train_moving': False}, 'none'), ('control 40', {'route_set': True, 'ahead_occupied': True, 'stand_s': 121, 'speed_kmh': 0, 'gap_m': 200, 'platform_train_moving': False}, 'call-on')], [('regression: creeping at walking pace', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 3, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('regression: rolling at call-on speed', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 12, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('boundary: no route', {'route_set': False, 'ahead_occupied': False, 'stand_s': 200, 'speed_kmh': 0, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('boundary: stood exactly two minutes', {'route_set': True, 'ahead_occupied': True, 'stand_s': 120, 'speed_kmh': 0, 'gap_m': 100, 'platform_train_moving': False}, 'call-on'), ('boundary: stood one second short', {'route_set': True, 'ahead_occupied': True, 'stand_s': 119, 'speed_kmh': 0, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('control 45', {'route_set': True, 'ahead_occupied': True, 'stand_s': 120, 'speed_kmh': 0, 'gap_m': 5, 'platform_train_moving': False}, 'none'), ('control 48', {'route_set': True, 'ahead_occupied': True, 'stand_s': 30, 'speed_kmh': 20, 'gap_m': 200, 'platform_train_moving': False}, 'none'), ('control 51', {'route_set': True, 'ahead_occupied': False, 'stand_s': 300, 'speed_kmh': 3, 'gap_m': 20, 'platform_train_moving': False}, 'main')]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: creeping at walking pace | call-on | none | Failed |
| sampled regression 25 | call-on | none | Failed |
| boundary: stood exactly two minutes | call-on | call-on | Passed |
| boundary: stood one second short | none | none | Passed |
| regression: rolling at call-on speed | call-on | none | Failed |
| control 1 | main | main | Passed |
| control 4 | none | none | Passed |
| control 7 | none | none | Passed |
SHA-256 / 3f662fd1ea3297115f3c22e6da6f25b8c850325254be7cb4490bd0c50c2062dc
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
if not x['route_set']:
return 'none'
if not x['ahead_occupied']:
return 'main'
if x['stand_s'] < 120 or x['speed_kmh'] >= 5:
return 'none'
if x['gap_m'] < 20:
return 'none'
if x['platform_train_moving']:
return 'none'
return 'call-on'
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: creeping at walking pace', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 3, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('sampled regression 25', {'route_set': True, 'ahead_occupied': True, 'stand_s': 120, 'speed_kmh': 15, 'gap_m': 21, 'platform_train_moving': False}, 'none'), ('boundary: stood exactly two minutes', {'route_set': True, 'ahead_occupied': True, 'stand_s': 120, 'speed_kmh': 0, 'gap_m': 100, 'platform_train_moving': False}, 'call-on'), ('boundary: stood one second short', {'route_set': True, 'ahead_occupied': True, 'stand_s': 119, 'speed_kmh': 0, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('regression: rolling at call-on speed', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 12, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('control 1', {'route_set': True, 'ahead_occupied': False, 'stand_s': 300, 'speed_kmh': 0, 'gap_m': 60, 'platform_train_moving': False}, 'main'), ('control 4', {'route_set': True, 'ahead_occupied': True, 'stand_s': 120, 'speed_kmh': 3, 'gap_m': 200, 'platform_train_moving': True}, 'none'), ('control 7', {'route_set': True, 'ahead_occupied': True, 'stand_s': 120, 'speed_kmh': 3, 'gap_m': 19, 'platform_train_moving': False}, 'none')], [('regression: rolling at call-on speed', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 12, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('regression: creeping at walking pace', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 3, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('boundary: platform train moving far away', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 0, 'gap_m': 200, 'platform_train_moving': True}, 'none'), ('boundary: platform train moving close by', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 0, 'gap_m': 30, 'platform_train_moving': True}, 'none'), ('boundary: gap exactly at the minimum', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 0, 'gap_m': 20, 'platform_train_moving': False}, 'call-on'), ('control 12', {'route_set': True, 'ahead_occupied': True, 'stand_s': 300, 'speed_kmh': 0, 'gap_m': 5, 'platform_train_moving': False}, 'none'), ('control 15', {'route_set': True, 'ahead_occupied': True, 'stand_s': 119, 'speed_kmh': 20, 'gap_m': 19, 'platform_train_moving': True}, 'none'), ('control 18', {'route_set': True, 'ahead_occupied': True, 'stand_s': 0, 'speed_kmh': 0, 'gap_m': 20, 'platform_train_moving': True}, 'none')], [('regression: creeping at walking pace', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 3, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('sampled regression 5', {'route_set': True, 'ahead_occupied': True, 'stand_s': 121, 'speed_kmh': 10, 'gap_m': 200, 'platform_train_moving': False}, 'none'), ('boundary: platform train moving far away', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 0, 'gap_m': 200, 'platform_train_moving': True}, 'none'), ('boundary: platform train moving close by', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 0, 'gap_m': 30, 'platform_train_moving': True}, 'none'), ('boundary: gap exactly at the minimum', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 0, 'gap_m': 20, 'platform_train_moving': False}, 'call-on'), ('control 23', {'route_set': True, 'ahead_occupied': True, 'stand_s': 30, 'speed_kmh': 15, 'gap_m': 200, 'platform_train_moving': False}, 'none'), ('control 26', {'route_set': False, 'ahead_occupied': True, 'stand_s': 120, 'speed_kmh': 0, 'gap_m': 19, 'platform_train_moving': False}, 'none'), ('control 29', {'route_set': True, 'ahead_occupied': True, 'stand_s': 30, 'speed_kmh': 20, 'gap_m': 19, 'platform_train_moving': False}, 'none')], [('regression: rolling at call-on speed', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 12, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('regression: creeping at walking pace', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 3, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('sampled regression 76', {'route_set': True, 'ahead_occupied': True, 'stand_s': 300, 'speed_kmh': 10, 'gap_m': 20, 'platform_train_moving': False}, 'none'), ('boundary: gap exactly at the minimum', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 0, 'gap_m': 20, 'platform_train_moving': False}, 'call-on'), ('boundary: clear platform for a moving train', {'route_set': True, 'ahead_occupied': False, 'stand_s': 0, 'speed_kmh': 40, 'gap_m': 100, 'platform_train_moving': False}, 'main'), ('control 34', {'route_set': True, 'ahead_occupied': True, 'stand_s': 120, 'speed_kmh': 20, 'gap_m': 60, 'platform_train_moving': False}, 'none'), ('control 37', {'route_set': True, 'ahead_occupied': True, 'stand_s': 0, 'speed_kmh': 20, 'gap_m': 19, 'platform_train_moving': False}, 'none'), ('control 40', {'route_set': True, 'ahead_occupied': True, 'stand_s': 121, 'speed_kmh': 0, 'gap_m': 200, 'platform_train_moving': False}, 'call-on')], [('regression: creeping at walking pace', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 3, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('regression: rolling at call-on speed', {'route_set': True, 'ahead_occupied': True, 'stand_s': 200, 'speed_kmh': 12, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('boundary: no route', {'route_set': False, 'ahead_occupied': False, 'stand_s': 200, 'speed_kmh': 0, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('boundary: stood exactly two minutes', {'route_set': True, 'ahead_occupied': True, 'stand_s': 120, 'speed_kmh': 0, 'gap_m': 100, 'platform_train_moving': False}, 'call-on'), ('boundary: stood one second short', {'route_set': True, 'ahead_occupied': True, 'stand_s': 119, 'speed_kmh': 0, 'gap_m': 100, 'platform_train_moving': False}, 'none'), ('control 45', {'route_set': True, 'ahead_occupied': True, 'stand_s': 120, 'speed_kmh': 0, 'gap_m': 5, 'platform_train_moving': False}, 'none'), ('control 48', {'route_set': True, 'ahead_occupied': True, 'stand_s': 30, 'speed_kmh': 20, 'gap_m': 200, 'platform_train_moving': False}, 'none'), ('control 51', {'route_set': True, 'ahead_occupied': False, 'stand_s': 300, 'speed_kmh': 3, 'gap_m': 20, 'platform_train_moving': False}, 'main')]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: creeping at walking pace | call-on | none | Failed |
| sampled regression 25 | none | none | Passed |
| boundary: stood exactly two minutes | call-on | call-on | Passed |
| boundary: stood one second short | none | none | Passed |
| regression: rolling at call-on speed | none | none | Passed |
| control 1 | main | main | Passed |
| control 4 | none | none | Passed |
| control 7 | none | none | Passed |
SHA-256 / 35bfb642d0f21b0094ee4c3f48785f197c0e32903a81a0c158d182aaf35e5fff
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
Stipulated toy interlocking contract for a bounded teaching model; it makes no claim of conformance to any railway signalling standard and omits real safety cases. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:47:50.664742+00:00.
Case digest / 28aed8615ae014d43d50fadf0443607f65a5a4486ca375e8cded15cd7101c7e8