FAILURE MAP
← Case archive

FA-89031 / Digital logic simulation / Open access

Bus keeper value lost when all drivers release · case 01

A kept bus reads 'z' after its drivers tri-state.

Verified by executionVariant 1 · 11 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The no-driver branch ignores the keeper.

THE FAILURE

The no-driver branch ignores the keeper.

Unsuccessful approach: Applying the keeper only when the driver list is empty misses buses whose drivers are all released.

Case contract

Input [drivers, keeper]: drivers are [value, strength] with value in 0/1/x/z and strength weak < pull < strong. 'z' drivers are ignored. With no active driver the net is the keeper value, or 'z' when keeper is None. Otherwise only drivers at the highest present strength matter: a single agreed value wins, any disagreement (including x) gives 'x'.

Why this case matters

Resolved nets in switch-level and RTL simulators combine drivers by strength; mixing up strengths or keepers changes observed bus values.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(*args):
    drivers, keep = args
    rank = {'weak': 0, 'pull': 1, 'strong': 2}
    live = [(v, s) for v, s in drivers if v != 'z']
    if not live:
        return 'z'
    top = max(live, key=lambda d: rank[d[1]])[1]
    vals = sorted({v for v, s in live if s == top})
    return vals[0] if len(vals) == 1 else 'x'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('strong beats weak listed first', [[['0', 'weak'], ['1', 'strong'], ['z', 'strong']], None], '1'), ('pull beats weak listed first', [[['0', 'weak'], ['1', 'pull']], None], '1'), ('strong contention', [[['0', 'strong'], ['1', 'strong'], ['1', 'pull']], None], 'x'), ('pull contention with weak agreement', [[['1', 'pull'], ['0', 'pull'], ['1', 'weak']], '1'], 'x'), ('released strong driver beside weak one', [[['z', 'strong'], ['1', 'weak']], None], '1'), ('all released with keeper', [[['z', 'strong']], '1'], '1'), ('single released driver with keeper', [[['z', 'pull']], '1'], '1'), ('all released without keeper', [[['z', 'weak'], ['z', 'strong']], None], 'z'), ('weak driver disagrees with keeper', [[['1', 'weak']], '0'], '1'), ('weak unknown under strong driver', [[['x', 'weak'], ['0', 'strong']], None], '0'), ('pull unknown under strong driver', [[['x', 'pull'], ['1', 'strong']], '0'], '1')], [('strong beats weak listed first', [[['0', 'weak'], ['1', 'strong'], ['z', 'strong'], ['z', 'strong']], None], '1'), ('pull beats weak listed first', [[['0', 'weak'], ['1', 'pull']], None], '1'), ('strong contention', [[['0', 'strong'], ['1', 'strong'], ['1', 'pull'], ['1', 'pull']], None], 'x'), ('pull contention with weak agreement', [[['1', 'pull'], ['0', 'pull'], ['1', 'weak']], '1'], 'x'), ('released strong driver beside weak one', [[['z', 'strong'], ['1', 'weak']], None], '1'), ('all released with keeper', [[['z', 'strong'], ['z', 'strong']], '0'], '0'), ('single released driver with keeper', [[['z', 'pull']], '1'], '1'), ('all released without keeper', [[['z', 'weak'], ['z', 'strong']], None], 'z'), ('weak driver disagrees with keeper', [[['1', 'weak'], ['1', 'weak']], '0'], '1'), ('weak unknown under strong driver', [[['x', 'weak'], ['0', 'strong']], None], '0'), ('pull unknown under strong driver', [[['x', 'pull'], ['1', 'strong']], '0'], '1')], [('strong beats weak listed first', [[['0', 'weak'], ['1', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong']], None], '1'), ('pull beats weak listed first', [[['0', 'weak'], ['1', 'pull']], None], '1'), ('strong contention', [[['0', 'strong'], ['1', 'strong'], ['1', 'pull'], ['1', 'pull'], ['1', 'pull']], None], 'x'), ('pull contention with weak agreement', [[['1', 'pull'], ['0', 'pull'], ['1', 'weak']], '1'], 'x'), ('released strong driver beside weak one', [[['z', 'strong'], ['1', 'weak']], None], '1'), ('all released with keeper', [[['z', 'strong'], ['z', 'strong'], ['z', 'strong']], '1'], '1'), ('single released driver with keeper', [[['z', 'pull']], '1'], '1'), ('all released without keeper', [[['z', 'weak'], ['z', 'strong']], None], 'z'), ('weak driver disagrees with keeper', [[['1', 'weak'], ['1', 'weak'], ['1', 'weak']], '0'], '1'), ('weak unknown under strong driver', [[['x', 'weak'], ['0', 'strong']], None], '0'), ('pull unknown under strong driver', [[['x', 'pull'], ['1', 'strong']], '0'], '1')], [('strong beats weak listed first', [[['0', 'weak'], ['1', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong']], None], '1'), ('pull beats weak listed first', [[['0', 'weak'], ['1', 'pull']], None], '1'), ('strong contention', [[['0', 'strong'], ['1', 'strong'], ['1', 'pull'], ['1', 'pull'], ['1', 'pull'], ['1', 'pull']], None], 'x'), ('pull contention with weak agreement', [[['1', 'pull'], ['0', 'pull'], ['1', 'weak']], '1'], 'x'), ('released strong driver beside weak one', [[['z', 'strong'], ['1', 'weak']], None], '1'), ('all released with keeper', [[['z', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong']], '0'], '0'), ('single released driver with keeper', [[['z', 'pull']], '1'], '1'), ('all released without keeper', [[['z', 'weak'], ['z', 'strong']], None], 'z'), ('weak driver disagrees with keeper', [[['1', 'weak'], ['1', 'weak'], ['1', 'weak'], ['1', 'weak']], '0'], '1'), ('weak unknown under strong driver', [[['x', 'weak'], ['0', 'strong']], None], '0'), ('pull unknown under strong driver', [[['x', 'pull'], ['1', 'strong']], '0'], '1')], [('strong beats weak listed first', [[['0', 'weak'], ['1', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong']], None], '1'), ('pull beats weak listed first', [[['0', 'weak'], ['1', 'pull']], None], '1'), ('strong contention', [[['0', 'strong'], ['1', 'strong'], ['1', 'pull'], ['1', 'pull'], ['1', 'pull'], ['1', 'pull'], ['1', 'pull']], None], 'x'), ('pull contention with weak agreement', [[['1', 'pull'], ['0', 'pull'], ['1', 'weak']], '1'], 'x'), ('released strong driver beside weak one', [[['z', 'strong'], ['1', 'weak']], None], '1'), ('all released with keeper', [[['z', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong']], '1'], '1'), ('single released driver with keeper', [[['z', 'pull']], '1'], '1'), ('all released without keeper', [[['z', 'weak'], ['z', 'strong']], None], 'z'), ('weak driver disagrees with keeper', [[['1', 'weak'], ['1', 'weak'], ['1', 'weak'], ['1', 'weak'], ['1', 'weak']], '0'], '1'), ('weak unknown under strong driver', [[['x', 'weak'], ['0', 'strong']], None], '0'), ('pull unknown under strong driver', [[['x', 'pull'], ['1', 'strong']], '0'], '1')]]
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 fixtureActualExpectedOutcome
strong beats weak listed first11Passed
pull beats weak listed first11Passed
strong contentionxxPassed
pull contention with weak agreementxxPassed
released strong driver beside weak one11Passed
all released with keeperz1Failed
single released driver with keeperz1Failed
all released without keeperzzPassed
weak driver disagrees with keeper11Passed
weak unknown under strong driver00Passed
pull unknown under strong driver11Passed

SHA-256 / 6031f43c1c5c0a59375418e4b4f3fb7ab1eba1a170de1fb6915b089cbc198b4c

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(*args):
    drivers, keep = args
    rank = {'weak': 0, 'pull': 1, 'strong': 2}
    live = [(v, s) for v, s in drivers if v != 'z']
    if not live:
        return keep if keep is not None and not drivers else 'z'
    top = max(live, key=lambda d: rank[d[1]])[1]
    vals = sorted({v for v, s in live if s == top})
    return vals[0] if len(vals) == 1 else 'x'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('strong beats weak listed first', [[['0', 'weak'], ['1', 'strong'], ['z', 'strong']], None], '1'), ('pull beats weak listed first', [[['0', 'weak'], ['1', 'pull']], None], '1'), ('strong contention', [[['0', 'strong'], ['1', 'strong'], ['1', 'pull']], None], 'x'), ('pull contention with weak agreement', [[['1', 'pull'], ['0', 'pull'], ['1', 'weak']], '1'], 'x'), ('released strong driver beside weak one', [[['z', 'strong'], ['1', 'weak']], None], '1'), ('all released with keeper', [[['z', 'strong']], '1'], '1'), ('single released driver with keeper', [[['z', 'pull']], '1'], '1'), ('all released without keeper', [[['z', 'weak'], ['z', 'strong']], None], 'z'), ('weak driver disagrees with keeper', [[['1', 'weak']], '0'], '1'), ('weak unknown under strong driver', [[['x', 'weak'], ['0', 'strong']], None], '0'), ('pull unknown under strong driver', [[['x', 'pull'], ['1', 'strong']], '0'], '1')], [('strong beats weak listed first', [[['0', 'weak'], ['1', 'strong'], ['z', 'strong'], ['z', 'strong']], None], '1'), ('pull beats weak listed first', [[['0', 'weak'], ['1', 'pull']], None], '1'), ('strong contention', [[['0', 'strong'], ['1', 'strong'], ['1', 'pull'], ['1', 'pull']], None], 'x'), ('pull contention with weak agreement', [[['1', 'pull'], ['0', 'pull'], ['1', 'weak']], '1'], 'x'), ('released strong driver beside weak one', [[['z', 'strong'], ['1', 'weak']], None], '1'), ('all released with keeper', [[['z', 'strong'], ['z', 'strong']], '0'], '0'), ('single released driver with keeper', [[['z', 'pull']], '1'], '1'), ('all released without keeper', [[['z', 'weak'], ['z', 'strong']], None], 'z'), ('weak driver disagrees with keeper', [[['1', 'weak'], ['1', 'weak']], '0'], '1'), ('weak unknown under strong driver', [[['x', 'weak'], ['0', 'strong']], None], '0'), ('pull unknown under strong driver', [[['x', 'pull'], ['1', 'strong']], '0'], '1')], [('strong beats weak listed first', [[['0', 'weak'], ['1', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong']], None], '1'), ('pull beats weak listed first', [[['0', 'weak'], ['1', 'pull']], None], '1'), ('strong contention', [[['0', 'strong'], ['1', 'strong'], ['1', 'pull'], ['1', 'pull'], ['1', 'pull']], None], 'x'), ('pull contention with weak agreement', [[['1', 'pull'], ['0', 'pull'], ['1', 'weak']], '1'], 'x'), ('released strong driver beside weak one', [[['z', 'strong'], ['1', 'weak']], None], '1'), ('all released with keeper', [[['z', 'strong'], ['z', 'strong'], ['z', 'strong']], '1'], '1'), ('single released driver with keeper', [[['z', 'pull']], '1'], '1'), ('all released without keeper', [[['z', 'weak'], ['z', 'strong']], None], 'z'), ('weak driver disagrees with keeper', [[['1', 'weak'], ['1', 'weak'], ['1', 'weak']], '0'], '1'), ('weak unknown under strong driver', [[['x', 'weak'], ['0', 'strong']], None], '0'), ('pull unknown under strong driver', [[['x', 'pull'], ['1', 'strong']], '0'], '1')], [('strong beats weak listed first', [[['0', 'weak'], ['1', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong']], None], '1'), ('pull beats weak listed first', [[['0', 'weak'], ['1', 'pull']], None], '1'), ('strong contention', [[['0', 'strong'], ['1', 'strong'], ['1', 'pull'], ['1', 'pull'], ['1', 'pull'], ['1', 'pull']], None], 'x'), ('pull contention with weak agreement', [[['1', 'pull'], ['0', 'pull'], ['1', 'weak']], '1'], 'x'), ('released strong driver beside weak one', [[['z', 'strong'], ['1', 'weak']], None], '1'), ('all released with keeper', [[['z', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong']], '0'], '0'), ('single released driver with keeper', [[['z', 'pull']], '1'], '1'), ('all released without keeper', [[['z', 'weak'], ['z', 'strong']], None], 'z'), ('weak driver disagrees with keeper', [[['1', 'weak'], ['1', 'weak'], ['1', 'weak'], ['1', 'weak']], '0'], '1'), ('weak unknown under strong driver', [[['x', 'weak'], ['0', 'strong']], None], '0'), ('pull unknown under strong driver', [[['x', 'pull'], ['1', 'strong']], '0'], '1')], [('strong beats weak listed first', [[['0', 'weak'], ['1', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong']], None], '1'), ('pull beats weak listed first', [[['0', 'weak'], ['1', 'pull']], None], '1'), ('strong contention', [[['0', 'strong'], ['1', 'strong'], ['1', 'pull'], ['1', 'pull'], ['1', 'pull'], ['1', 'pull'], ['1', 'pull']], None], 'x'), ('pull contention with weak agreement', [[['1', 'pull'], ['0', 'pull'], ['1', 'weak']], '1'], 'x'), ('released strong driver beside weak one', [[['z', 'strong'], ['1', 'weak']], None], '1'), ('all released with keeper', [[['z', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong'], ['z', 'strong']], '1'], '1'), ('single released driver with keeper', [[['z', 'pull']], '1'], '1'), ('all released without keeper', [[['z', 'weak'], ['z', 'strong']], None], 'z'), ('weak driver disagrees with keeper', [[['1', 'weak'], ['1', 'weak'], ['1', 'weak'], ['1', 'weak'], ['1', 'weak']], '0'], '1'), ('weak unknown under strong driver', [[['x', 'weak'], ['0', 'strong']], None], '0'), ('pull unknown under strong driver', [[['x', 'pull'], ['1', 'strong']], '0'], '1')]]
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 fixtureActualExpectedOutcome
strong beats weak listed first11Passed
pull beats weak listed first11Passed
strong contentionxxPassed
pull contention with weak agreementxxPassed
released strong driver beside weak one11Passed
all released with keeperz1Failed
single released driver with keeperz1Failed
all released without keeperzzPassed
weak driver disagrees with keeper11Passed
weak unknown under strong driver00Passed
pull unknown under strong driver11Passed

SHA-256 / 82cad95fddb672111c39bdb1b0d097ca16616d4dcf7ac5b224c47aa43afc1403

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 11 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

A deterministic bounded teaching model of one simulator rule set; the contract is stipulated and is not a claim of conformance to any HDL standard or commercial simulator. 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:51:13.633378+00:00.

Case digest / a71649790c24de0a45707a9090bd7105c15b89d912c5d8e577fd486a962b4b8d