FA-40281 / Heap invariants / Open access
Indexed self-swap emits no spurious relocation notification · case 01
The bounded indexed swap certificate reports an incorrect changed handles.
ROOT CAUSE
Indexed self-swap emits no spurious relocation notification.
VERIFIED REPAIR
Derive changed handles using [] if i==j else [a[i],a[j]] under the stated bounded certificate contract.
Unsuccessful approach: The local patch uses [] and still violates the stated relation.
Case contract
An indexed heap swap receives unique entry ids in slots, an exact inverse position map, and two in-range positions i,j. Swap the records, update both inverse-map locations, keep cardinality and membership, and report the two moved identities. Self-swap is allowed.
Why this case matters
This isolates an internal heap representation or priority-structure invariant using deterministic finite records.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
a=d['slots']; i=d['i']; j=d['j']; after=list(a); after[i],after[j]=after[j],after[i]; pos={x:k for k,x in enumerate(a)}
return {'slots': after,
'positions': {x:k for k,x in enumerate(after)},
'first_moved': [a[i],j],
'second_moved': [a[j],i],
'changed_handles': [a[i],a[j]],
'bijective': len(set(after))==len(pos)}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[({'slots': ['a'], 'i': 0, 'j': 0}, {'slots': ['a'], 'positions': {'a': 0}, 'first_moved': ['a', 0], 'second_moved': ['a', 0], 'changed_handles': [], 'bijective': True}), ({'slots': ['z', 'a'], 'i': 0, 'j': 1}, {'slots': ['a', 'z'], 'positions': {'a': 0, 'z': 1}, 'first_moved': ['z', 1], 'second_moved': ['a', 0], 'changed_handles': ['z', 'a'], 'bijective': True}), ({'slots': ['b', 'd', 'a'], 'i': 0, 'j': 2}, {'slots': ['a', 'd', 'b'], 'positions': {'a': 0, 'd': 1, 'b': 2}, 'first_moved': ['b', 2], 'second_moved': ['a', 0], 'changed_handles': ['b', 'a'], 'bijective': True}), ({'slots': ['a', 'b', 'c', 'd'], 'i': 1, 'j': 3}, {'slots': ['a', 'd', 'c', 'b'], 'positions': {'a': 0, 'd': 1, 'c': 2, 'b': 3}, 'first_moved': ['b', 3], 'second_moved': ['d', 1], 'changed_handles': ['b', 'd'], 'bijective': True}), ({'slots': ['x', 'y', 'z'], 'i': 1, 'j': 1}, {'slots': ['x', 'y', 'z'], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'first_moved': ['y', 1], 'second_moved': ['y', 1], 'changed_handles': [], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 0}, {'slots': ['u', 'r', 's', 't', 'q'], 'positions': {'u': 0, 'r': 1, 's': 2, 't': 3, 'q': 4}, 'first_moved': ['u', 0], 'second_moved': ['q', 4], 'changed_handles': ['u', 'q'], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 1, 'j': 3}, {'slots': ['q', 't', 's', 'r', 'u'], 'positions': {'q': 0, 't': 1, 's': 2, 'r': 3, 'u': 4}, 'first_moved': ['r', 3], 'second_moved': ['t', 1], 'changed_handles': ['r', 't'], 'bijective': True})], [({'slots': ['a'], 'i': 0, 'j': 0}, {'slots': ['a'], 'positions': {'a': 0}, 'first_moved': ['a', 0], 'second_moved': ['a', 0], 'changed_handles': [], 'bijective': True}), ({'slots': ['z', 'a'], 'i': 0, 'j': 1}, {'slots': ['a', 'z'], 'positions': {'a': 0, 'z': 1}, 'first_moved': ['z', 1], 'second_moved': ['a', 0], 'changed_handles': ['z', 'a'], 'bijective': True}), ({'slots': ['b', 'd', 'a'], 'i': 0, 'j': 2}, {'slots': ['a', 'd', 'b'], 'positions': {'a': 0, 'd': 1, 'b': 2}, 'first_moved': ['b', 2], 'second_moved': ['a', 0], 'changed_handles': ['b', 'a'], 'bijective': True}), ({'slots': ['a', 'b', 'c', 'd'], 'i': 1, 'j': 3}, {'slots': ['a', 'd', 'c', 'b'], 'positions': {'a': 0, 'd': 1, 'c': 2, 'b': 3}, 'first_moved': ['b', 3], 'second_moved': ['d', 1], 'changed_handles': ['b', 'd'], 'bijective': True}), ({'slots': ['x', 'y', 'z'], 'i': 1, 'j': 1}, {'slots': ['x', 'y', 'z'], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'first_moved': ['y', 1], 'second_moved': ['y', 1], 'changed_handles': [], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 0}, {'slots': ['u', 'r', 's', 't', 'q'], 'positions': {'u': 0, 'r': 1, 's': 2, 't': 3, 'q': 4}, 'first_moved': ['u', 0], 'second_moved': ['q', 4], 'changed_handles': ['u', 'q'], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 2, 'j': 4}, {'slots': ['q', 'r', 'u', 't', 's'], 'positions': {'q': 0, 'r': 1, 'u': 2, 't': 3, 's': 4}, 'first_moved': ['s', 4], 'second_moved': ['u', 2], 'changed_handles': ['s', 'u'], 'bijective': True})], [({'slots': ['a'], 'i': 0, 'j': 0}, {'slots': ['a'], 'positions': {'a': 0}, 'first_moved': ['a', 0], 'second_moved': ['a', 0], 'changed_handles': [], 'bijective': True}), ({'slots': ['z', 'a'], 'i': 0, 'j': 1}, {'slots': ['a', 'z'], 'positions': {'a': 0, 'z': 1}, 'first_moved': ['z', 1], 'second_moved': ['a', 0], 'changed_handles': ['z', 'a'], 'bijective': True}), ({'slots': ['b', 'd', 'a'], 'i': 0, 'j': 2}, {'slots': ['a', 'd', 'b'], 'positions': {'a': 0, 'd': 1, 'b': 2}, 'first_moved': ['b', 2], 'second_moved': ['a', 0], 'changed_handles': ['b', 'a'], 'bijective': True}), ({'slots': ['a', 'b', 'c', 'd'], 'i': 1, 'j': 3}, {'slots': ['a', 'd', 'c', 'b'], 'positions': {'a': 0, 'd': 1, 'c': 2, 'b': 3}, 'first_moved': ['b', 3], 'second_moved': ['d', 1], 'changed_handles': ['b', 'd'], 'bijective': True}), ({'slots': ['x', 'y', 'z'], 'i': 1, 'j': 1}, {'slots': ['x', 'y', 'z'], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'first_moved': ['y', 1], 'second_moved': ['y', 1], 'changed_handles': [], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 0}, {'slots': ['u', 'r', 's', 't', 'q'], 'positions': {'u': 0, 'r': 1, 's': 2, 't': 3, 'q': 4}, 'first_moved': ['u', 0], 'second_moved': ['q', 4], 'changed_handles': ['u', 'q'], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 3, 'j': 0}, {'slots': ['t', 'r', 's', 'q', 'u'], 'positions': {'t': 0, 'r': 1, 's': 2, 'q': 3, 'u': 4}, 'first_moved': ['t', 0], 'second_moved': ['q', 3], 'changed_handles': ['t', 'q'], 'bijective': True})], [({'slots': ['a'], 'i': 0, 'j': 0}, {'slots': ['a'], 'positions': {'a': 0}, 'first_moved': ['a', 0], 'second_moved': ['a', 0], 'changed_handles': [], 'bijective': True}), ({'slots': ['z', 'a'], 'i': 0, 'j': 1}, {'slots': ['a', 'z'], 'positions': {'a': 0, 'z': 1}, 'first_moved': ['z', 1], 'second_moved': ['a', 0], 'changed_handles': ['z', 'a'], 'bijective': True}), ({'slots': ['b', 'd', 'a'], 'i': 0, 'j': 2}, {'slots': ['a', 'd', 'b'], 'positions': {'a': 0, 'd': 1, 'b': 2}, 'first_moved': ['b', 2], 'second_moved': ['a', 0], 'changed_handles': ['b', 'a'], 'bijective': True}), ({'slots': ['a', 'b', 'c', 'd'], 'i': 1, 'j': 3}, {'slots': ['a', 'd', 'c', 'b'], 'positions': {'a': 0, 'd': 1, 'c': 2, 'b': 3}, 'first_moved': ['b', 3], 'second_moved': ['d', 1], 'changed_handles': ['b', 'd'], 'bijective': True}), ({'slots': ['x', 'y', 'z'], 'i': 1, 'j': 1}, {'slots': ['x', 'y', 'z'], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'first_moved': ['y', 1], 'second_moved': ['y', 1], 'changed_handles': [], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 0}, {'slots': ['u', 'r', 's', 't', 'q'], 'positions': {'u': 0, 'r': 1, 's': 2, 't': 3, 'q': 4}, 'first_moved': ['u', 0], 'second_moved': ['q', 4], 'changed_handles': ['u', 'q'], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 1}, {'slots': ['q', 'u', 's', 't', 'r'], 'positions': {'q': 0, 'u': 1, 's': 2, 't': 3, 'r': 4}, 'first_moved': ['u', 1], 'second_moved': ['r', 4], 'changed_handles': ['u', 'r'], 'bijective': True})], [({'slots': ['a'], 'i': 0, 'j': 0}, {'slots': ['a'], 'positions': {'a': 0}, 'first_moved': ['a', 0], 'second_moved': ['a', 0], 'changed_handles': [], 'bijective': True}), ({'slots': ['z', 'a'], 'i': 0, 'j': 1}, {'slots': ['a', 'z'], 'positions': {'a': 0, 'z': 1}, 'first_moved': ['z', 1], 'second_moved': ['a', 0], 'changed_handles': ['z', 'a'], 'bijective': True}), ({'slots': ['b', 'd', 'a'], 'i': 0, 'j': 2}, {'slots': ['a', 'd', 'b'], 'positions': {'a': 0, 'd': 1, 'b': 2}, 'first_moved': ['b', 2], 'second_moved': ['a', 0], 'changed_handles': ['b', 'a'], 'bijective': True}), ({'slots': ['a', 'b', 'c', 'd'], 'i': 1, 'j': 3}, {'slots': ['a', 'd', 'c', 'b'], 'positions': {'a': 0, 'd': 1, 'c': 2, 'b': 3}, 'first_moved': ['b', 3], 'second_moved': ['d', 1], 'changed_handles': ['b', 'd'], 'bijective': True}), ({'slots': ['x', 'y', 'z'], 'i': 1, 'j': 1}, {'slots': ['x', 'y', 'z'], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'first_moved': ['y', 1], 'second_moved': ['y', 1], 'changed_handles': [], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 0}, {'slots': ['u', 'r', 's', 't', 'q'], 'positions': {'u': 0, 'r': 1, 's': 2, 't': 3, 'q': 4}, 'first_moved': ['u', 0], 'second_moved': ['q', 4], 'changed_handles': ['u', 'q'], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 0, 'j': 2}, {'slots': ['s', 'r', 'q', 't', 'u'], 'positions': {'s': 0, 'r': 1, 'q': 2, 't': 3, 'u': 4}, 'first_moved': ['q', 2], 'second_moved': ['s', 0], 'changed_handles': ['q', 's'], 'bijective': True})]][N-1]
check('regression certificate 1', solve(cases[0][0]), cases[0][1])
check('regression certificate 2', solve(cases[1][0]), cases[1][1])
check('regression certificate 3', solve(cases[2][0]), cases[2][1])
check('regression certificate 4', solve(cases[3][0]), cases[3][1])
check('regression certificate 5', solve(cases[4][0]), cases[4][1])
check('regression certificate 6', solve(cases[5][0]), cases[5][1])
check('variant-dependent certificate', solve(cases[6][0]), cases[6][1])
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 certificate 1 | {'bijective': True, 'changed_handles': ['a', 'a'], 'first_moved': ['a', 0], 'positions': {'a': 0}, 'second_moved': ['a', 0], 'slots': ['a']} | {'bijective': True, 'changed_handles': [], 'first_moved': ['a', 0], 'positions': {'a': 0}, 'second_moved': ['a', 0], 'slots': ['a']} | Failed |
| regression certificate 2 | {'bijective': True, 'changed_handles': ['z', 'a'], 'first_moved': ['z', 1], 'positions': {'a': 0, 'z': 1}, 'second_moved': ['a', 0], 'slots': ['a', 'z']} | {'bijective': True, 'changed_handles': ['z', 'a'], 'first_moved': ['z', 1], 'positions': {'a': 0, 'z': 1}, 'second_moved': ['a', 0], 'slots': ['a', 'z']} | Passed |
| regression certificate 3 | {'bijective': True, 'changed_handles': ['b', 'a'], 'first_moved': ['b', 2], 'positions': {'a': 0, 'b': 2, 'd': 1}, 'second_moved': ['a', 0], 'slots': ['a', 'd', 'b']} | {'bijective': True, 'changed_handles': ['b', 'a'], 'first_moved': ['b', 2], 'positions': {'a': 0, 'b': 2, 'd': 1}, 'second_moved': ['a', 0], 'slots': ['a', 'd', 'b']} | Passed |
| regression certificate 4 | {'bijective': True, 'changed_handles': ['b', 'd'], 'first_moved': ['b', 3], 'positions': {'a': 0, 'b': 3, 'c': 2, 'd': 1}, 'second_moved': ['d', 1], 'slots': ['a', 'd', 'c', 'b']} | {'bijective': True, 'changed_handles': ['b', 'd'], 'first_moved': ['b', 3], 'positions': {'a': 0, 'b': 3, 'c': 2, 'd': 1}, 'second_moved': ['d', 1], 'slots': ['a', 'd', 'c', 'b']} | Passed |
| regression certificate 5 | {'bijective': True, 'changed_handles': ['y', 'y'], 'first_moved': ['y', 1], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'second_moved': ['y', 1], 'slots': ['x', 'y', 'z']} | {'bijective': True, 'changed_handles': [], 'first_moved': ['y', 1], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'second_moved': ['y', 1], 'slots': ['x', 'y', 'z']} | Failed |
| regression certificate 6 | {'bijective': True, 'changed_handles': ['u', 'q'], 'first_moved': ['u', 0], 'positions': {'q': 4, 'r': 1, 's': 2, 't': 3, 'u': 0}, 'second_moved': ['q', 4], 'slots': ['u', 'r', 's', 't', 'q']} | {'bijective': True, 'changed_handles': ['u', 'q'], 'first_moved': ['u', 0], 'positions': {'q': 4, 'r': 1, 's': 2, 't': 3, 'u': 0}, 'second_moved': ['q', 4], 'slots': ['u', 'r', 's', 't', 'q']} | Passed |
| variant-dependent certificate | {'bijective': True, 'changed_handles': ['r', 't'], 'first_moved': ['r', 3], 'positions': {'q': 0, 'r': 3, 's': 2, 't': 1, 'u': 4}, 'second_moved': ['t', 1], 'slots': ['q', 't', 's', 'r', 'u']} | {'bijective': True, 'changed_handles': ['r', 't'], 'first_moved': ['r', 3], 'positions': {'q': 0, 'r': 3, 's': 2, 't': 1, 'u': 4}, 'second_moved': ['t', 1], 'slots': ['q', 't', 's', 'r', 'u']} | Passed |
SHA-256 / 1e88152c3fa2c8025a5794bd07c1ee965c38c681be2e20ba945ccbc77a183d2f
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
a=d['slots']; i=d['i']; j=d['j']; after=list(a); after[i],after[j]=after[j],after[i]; pos={x:k for k,x in enumerate(a)}
return {'slots': after,
'positions': {x:k for k,x in enumerate(after)},
'first_moved': [a[i],j],
'second_moved': [a[j],i],
'changed_handles': [],
'bijective': len(set(after))==len(pos)}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[({'slots': ['a'], 'i': 0, 'j': 0}, {'slots': ['a'], 'positions': {'a': 0}, 'first_moved': ['a', 0], 'second_moved': ['a', 0], 'changed_handles': [], 'bijective': True}), ({'slots': ['z', 'a'], 'i': 0, 'j': 1}, {'slots': ['a', 'z'], 'positions': {'a': 0, 'z': 1}, 'first_moved': ['z', 1], 'second_moved': ['a', 0], 'changed_handles': ['z', 'a'], 'bijective': True}), ({'slots': ['b', 'd', 'a'], 'i': 0, 'j': 2}, {'slots': ['a', 'd', 'b'], 'positions': {'a': 0, 'd': 1, 'b': 2}, 'first_moved': ['b', 2], 'second_moved': ['a', 0], 'changed_handles': ['b', 'a'], 'bijective': True}), ({'slots': ['a', 'b', 'c', 'd'], 'i': 1, 'j': 3}, {'slots': ['a', 'd', 'c', 'b'], 'positions': {'a': 0, 'd': 1, 'c': 2, 'b': 3}, 'first_moved': ['b', 3], 'second_moved': ['d', 1], 'changed_handles': ['b', 'd'], 'bijective': True}), ({'slots': ['x', 'y', 'z'], 'i': 1, 'j': 1}, {'slots': ['x', 'y', 'z'], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'first_moved': ['y', 1], 'second_moved': ['y', 1], 'changed_handles': [], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 0}, {'slots': ['u', 'r', 's', 't', 'q'], 'positions': {'u': 0, 'r': 1, 's': 2, 't': 3, 'q': 4}, 'first_moved': ['u', 0], 'second_moved': ['q', 4], 'changed_handles': ['u', 'q'], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 1, 'j': 3}, {'slots': ['q', 't', 's', 'r', 'u'], 'positions': {'q': 0, 't': 1, 's': 2, 'r': 3, 'u': 4}, 'first_moved': ['r', 3], 'second_moved': ['t', 1], 'changed_handles': ['r', 't'], 'bijective': True})], [({'slots': ['a'], 'i': 0, 'j': 0}, {'slots': ['a'], 'positions': {'a': 0}, 'first_moved': ['a', 0], 'second_moved': ['a', 0], 'changed_handles': [], 'bijective': True}), ({'slots': ['z', 'a'], 'i': 0, 'j': 1}, {'slots': ['a', 'z'], 'positions': {'a': 0, 'z': 1}, 'first_moved': ['z', 1], 'second_moved': ['a', 0], 'changed_handles': ['z', 'a'], 'bijective': True}), ({'slots': ['b', 'd', 'a'], 'i': 0, 'j': 2}, {'slots': ['a', 'd', 'b'], 'positions': {'a': 0, 'd': 1, 'b': 2}, 'first_moved': ['b', 2], 'second_moved': ['a', 0], 'changed_handles': ['b', 'a'], 'bijective': True}), ({'slots': ['a', 'b', 'c', 'd'], 'i': 1, 'j': 3}, {'slots': ['a', 'd', 'c', 'b'], 'positions': {'a': 0, 'd': 1, 'c': 2, 'b': 3}, 'first_moved': ['b', 3], 'second_moved': ['d', 1], 'changed_handles': ['b', 'd'], 'bijective': True}), ({'slots': ['x', 'y', 'z'], 'i': 1, 'j': 1}, {'slots': ['x', 'y', 'z'], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'first_moved': ['y', 1], 'second_moved': ['y', 1], 'changed_handles': [], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 0}, {'slots': ['u', 'r', 's', 't', 'q'], 'positions': {'u': 0, 'r': 1, 's': 2, 't': 3, 'q': 4}, 'first_moved': ['u', 0], 'second_moved': ['q', 4], 'changed_handles': ['u', 'q'], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 2, 'j': 4}, {'slots': ['q', 'r', 'u', 't', 's'], 'positions': {'q': 0, 'r': 1, 'u': 2, 't': 3, 's': 4}, 'first_moved': ['s', 4], 'second_moved': ['u', 2], 'changed_handles': ['s', 'u'], 'bijective': True})], [({'slots': ['a'], 'i': 0, 'j': 0}, {'slots': ['a'], 'positions': {'a': 0}, 'first_moved': ['a', 0], 'second_moved': ['a', 0], 'changed_handles': [], 'bijective': True}), ({'slots': ['z', 'a'], 'i': 0, 'j': 1}, {'slots': ['a', 'z'], 'positions': {'a': 0, 'z': 1}, 'first_moved': ['z', 1], 'second_moved': ['a', 0], 'changed_handles': ['z', 'a'], 'bijective': True}), ({'slots': ['b', 'd', 'a'], 'i': 0, 'j': 2}, {'slots': ['a', 'd', 'b'], 'positions': {'a': 0, 'd': 1, 'b': 2}, 'first_moved': ['b', 2], 'second_moved': ['a', 0], 'changed_handles': ['b', 'a'], 'bijective': True}), ({'slots': ['a', 'b', 'c', 'd'], 'i': 1, 'j': 3}, {'slots': ['a', 'd', 'c', 'b'], 'positions': {'a': 0, 'd': 1, 'c': 2, 'b': 3}, 'first_moved': ['b', 3], 'second_moved': ['d', 1], 'changed_handles': ['b', 'd'], 'bijective': True}), ({'slots': ['x', 'y', 'z'], 'i': 1, 'j': 1}, {'slots': ['x', 'y', 'z'], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'first_moved': ['y', 1], 'second_moved': ['y', 1], 'changed_handles': [], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 0}, {'slots': ['u', 'r', 's', 't', 'q'], 'positions': {'u': 0, 'r': 1, 's': 2, 't': 3, 'q': 4}, 'first_moved': ['u', 0], 'second_moved': ['q', 4], 'changed_handles': ['u', 'q'], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 3, 'j': 0}, {'slots': ['t', 'r', 's', 'q', 'u'], 'positions': {'t': 0, 'r': 1, 's': 2, 'q': 3, 'u': 4}, 'first_moved': ['t', 0], 'second_moved': ['q', 3], 'changed_handles': ['t', 'q'], 'bijective': True})], [({'slots': ['a'], 'i': 0, 'j': 0}, {'slots': ['a'], 'positions': {'a': 0}, 'first_moved': ['a', 0], 'second_moved': ['a', 0], 'changed_handles': [], 'bijective': True}), ({'slots': ['z', 'a'], 'i': 0, 'j': 1}, {'slots': ['a', 'z'], 'positions': {'a': 0, 'z': 1}, 'first_moved': ['z', 1], 'second_moved': ['a', 0], 'changed_handles': ['z', 'a'], 'bijective': True}), ({'slots': ['b', 'd', 'a'], 'i': 0, 'j': 2}, {'slots': ['a', 'd', 'b'], 'positions': {'a': 0, 'd': 1, 'b': 2}, 'first_moved': ['b', 2], 'second_moved': ['a', 0], 'changed_handles': ['b', 'a'], 'bijective': True}), ({'slots': ['a', 'b', 'c', 'd'], 'i': 1, 'j': 3}, {'slots': ['a', 'd', 'c', 'b'], 'positions': {'a': 0, 'd': 1, 'c': 2, 'b': 3}, 'first_moved': ['b', 3], 'second_moved': ['d', 1], 'changed_handles': ['b', 'd'], 'bijective': True}), ({'slots': ['x', 'y', 'z'], 'i': 1, 'j': 1}, {'slots': ['x', 'y', 'z'], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'first_moved': ['y', 1], 'second_moved': ['y', 1], 'changed_handles': [], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 0}, {'slots': ['u', 'r', 's', 't', 'q'], 'positions': {'u': 0, 'r': 1, 's': 2, 't': 3, 'q': 4}, 'first_moved': ['u', 0], 'second_moved': ['q', 4], 'changed_handles': ['u', 'q'], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 1}, {'slots': ['q', 'u', 's', 't', 'r'], 'positions': {'q': 0, 'u': 1, 's': 2, 't': 3, 'r': 4}, 'first_moved': ['u', 1], 'second_moved': ['r', 4], 'changed_handles': ['u', 'r'], 'bijective': True})], [({'slots': ['a'], 'i': 0, 'j': 0}, {'slots': ['a'], 'positions': {'a': 0}, 'first_moved': ['a', 0], 'second_moved': ['a', 0], 'changed_handles': [], 'bijective': True}), ({'slots': ['z', 'a'], 'i': 0, 'j': 1}, {'slots': ['a', 'z'], 'positions': {'a': 0, 'z': 1}, 'first_moved': ['z', 1], 'second_moved': ['a', 0], 'changed_handles': ['z', 'a'], 'bijective': True}), ({'slots': ['b', 'd', 'a'], 'i': 0, 'j': 2}, {'slots': ['a', 'd', 'b'], 'positions': {'a': 0, 'd': 1, 'b': 2}, 'first_moved': ['b', 2], 'second_moved': ['a', 0], 'changed_handles': ['b', 'a'], 'bijective': True}), ({'slots': ['a', 'b', 'c', 'd'], 'i': 1, 'j': 3}, {'slots': ['a', 'd', 'c', 'b'], 'positions': {'a': 0, 'd': 1, 'c': 2, 'b': 3}, 'first_moved': ['b', 3], 'second_moved': ['d', 1], 'changed_handles': ['b', 'd'], 'bijective': True}), ({'slots': ['x', 'y', 'z'], 'i': 1, 'j': 1}, {'slots': ['x', 'y', 'z'], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'first_moved': ['y', 1], 'second_moved': ['y', 1], 'changed_handles': [], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 0}, {'slots': ['u', 'r', 's', 't', 'q'], 'positions': {'u': 0, 'r': 1, 's': 2, 't': 3, 'q': 4}, 'first_moved': ['u', 0], 'second_moved': ['q', 4], 'changed_handles': ['u', 'q'], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 0, 'j': 2}, {'slots': ['s', 'r', 'q', 't', 'u'], 'positions': {'s': 0, 'r': 1, 'q': 2, 't': 3, 'u': 4}, 'first_moved': ['q', 2], 'second_moved': ['s', 0], 'changed_handles': ['q', 's'], 'bijective': True})]][N-1]
check('regression certificate 1', solve(cases[0][0]), cases[0][1])
check('regression certificate 2', solve(cases[1][0]), cases[1][1])
check('regression certificate 3', solve(cases[2][0]), cases[2][1])
check('regression certificate 4', solve(cases[3][0]), cases[3][1])
check('regression certificate 5', solve(cases[4][0]), cases[4][1])
check('regression certificate 6', solve(cases[5][0]), cases[5][1])
check('variant-dependent certificate', solve(cases[6][0]), cases[6][1])
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 certificate 1 | {'bijective': True, 'changed_handles': [], 'first_moved': ['a', 0], 'positions': {'a': 0}, 'second_moved': ['a', 0], 'slots': ['a']} | {'bijective': True, 'changed_handles': [], 'first_moved': ['a', 0], 'positions': {'a': 0}, 'second_moved': ['a', 0], 'slots': ['a']} | Passed |
| regression certificate 2 | {'bijective': True, 'changed_handles': [], 'first_moved': ['z', 1], 'positions': {'a': 0, 'z': 1}, 'second_moved': ['a', 0], 'slots': ['a', 'z']} | {'bijective': True, 'changed_handles': ['z', 'a'], 'first_moved': ['z', 1], 'positions': {'a': 0, 'z': 1}, 'second_moved': ['a', 0], 'slots': ['a', 'z']} | Failed |
| regression certificate 3 | {'bijective': True, 'changed_handles': [], 'first_moved': ['b', 2], 'positions': {'a': 0, 'b': 2, 'd': 1}, 'second_moved': ['a', 0], 'slots': ['a', 'd', 'b']} | {'bijective': True, 'changed_handles': ['b', 'a'], 'first_moved': ['b', 2], 'positions': {'a': 0, 'b': 2, 'd': 1}, 'second_moved': ['a', 0], 'slots': ['a', 'd', 'b']} | Failed |
| regression certificate 4 | {'bijective': True, 'changed_handles': [], 'first_moved': ['b', 3], 'positions': {'a': 0, 'b': 3, 'c': 2, 'd': 1}, 'second_moved': ['d', 1], 'slots': ['a', 'd', 'c', 'b']} | {'bijective': True, 'changed_handles': ['b', 'd'], 'first_moved': ['b', 3], 'positions': {'a': 0, 'b': 3, 'c': 2, 'd': 1}, 'second_moved': ['d', 1], 'slots': ['a', 'd', 'c', 'b']} | Failed |
| regression certificate 5 | {'bijective': True, 'changed_handles': [], 'first_moved': ['y', 1], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'second_moved': ['y', 1], 'slots': ['x', 'y', 'z']} | {'bijective': True, 'changed_handles': [], 'first_moved': ['y', 1], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'second_moved': ['y', 1], 'slots': ['x', 'y', 'z']} | Passed |
| regression certificate 6 | {'bijective': True, 'changed_handles': [], 'first_moved': ['u', 0], 'positions': {'q': 4, 'r': 1, 's': 2, 't': 3, 'u': 0}, 'second_moved': ['q', 4], 'slots': ['u', 'r', 's', 't', 'q']} | {'bijective': True, 'changed_handles': ['u', 'q'], 'first_moved': ['u', 0], 'positions': {'q': 4, 'r': 1, 's': 2, 't': 3, 'u': 0}, 'second_moved': ['q', 4], 'slots': ['u', 'r', 's', 't', 'q']} | Failed |
| variant-dependent certificate | {'bijective': True, 'changed_handles': [], 'first_moved': ['r', 3], 'positions': {'q': 0, 'r': 3, 's': 2, 't': 1, 'u': 4}, 'second_moved': ['t', 1], 'slots': ['q', 't', 's', 'r', 'u']} | {'bijective': True, 'changed_handles': ['r', 't'], 'first_moved': ['r', 3], 'positions': {'q': 0, 'r': 3, 's': 2, 't': 1, 'u': 4}, 'second_moved': ['t', 1], 'slots': ['q', 't', 's', 'r', 'u']} | Failed |
SHA-256 / 7fe5ab7047f1b1373b9bef0a123349f7bca921207a0405371d8894fd5e67c719
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
a=d['slots']; i=d['i']; j=d['j']; after=list(a); after[i],after[j]=after[j],after[i]; pos={x:k for k,x in enumerate(a)}
return {'slots': after,
'positions': {x:k for k,x in enumerate(after)},
'first_moved': [a[i],j],
'second_moved': [a[j],i],
'changed_handles': [] if i==j else [a[i],a[j]],
'bijective': len(set(after))==len(pos)}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[({'slots': ['a'], 'i': 0, 'j': 0}, {'slots': ['a'], 'positions': {'a': 0}, 'first_moved': ['a', 0], 'second_moved': ['a', 0], 'changed_handles': [], 'bijective': True}), ({'slots': ['z', 'a'], 'i': 0, 'j': 1}, {'slots': ['a', 'z'], 'positions': {'a': 0, 'z': 1}, 'first_moved': ['z', 1], 'second_moved': ['a', 0], 'changed_handles': ['z', 'a'], 'bijective': True}), ({'slots': ['b', 'd', 'a'], 'i': 0, 'j': 2}, {'slots': ['a', 'd', 'b'], 'positions': {'a': 0, 'd': 1, 'b': 2}, 'first_moved': ['b', 2], 'second_moved': ['a', 0], 'changed_handles': ['b', 'a'], 'bijective': True}), ({'slots': ['a', 'b', 'c', 'd'], 'i': 1, 'j': 3}, {'slots': ['a', 'd', 'c', 'b'], 'positions': {'a': 0, 'd': 1, 'c': 2, 'b': 3}, 'first_moved': ['b', 3], 'second_moved': ['d', 1], 'changed_handles': ['b', 'd'], 'bijective': True}), ({'slots': ['x', 'y', 'z'], 'i': 1, 'j': 1}, {'slots': ['x', 'y', 'z'], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'first_moved': ['y', 1], 'second_moved': ['y', 1], 'changed_handles': [], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 0}, {'slots': ['u', 'r', 's', 't', 'q'], 'positions': {'u': 0, 'r': 1, 's': 2, 't': 3, 'q': 4}, 'first_moved': ['u', 0], 'second_moved': ['q', 4], 'changed_handles': ['u', 'q'], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 1, 'j': 3}, {'slots': ['q', 't', 's', 'r', 'u'], 'positions': {'q': 0, 't': 1, 's': 2, 'r': 3, 'u': 4}, 'first_moved': ['r', 3], 'second_moved': ['t', 1], 'changed_handles': ['r', 't'], 'bijective': True})], [({'slots': ['a'], 'i': 0, 'j': 0}, {'slots': ['a'], 'positions': {'a': 0}, 'first_moved': ['a', 0], 'second_moved': ['a', 0], 'changed_handles': [], 'bijective': True}), ({'slots': ['z', 'a'], 'i': 0, 'j': 1}, {'slots': ['a', 'z'], 'positions': {'a': 0, 'z': 1}, 'first_moved': ['z', 1], 'second_moved': ['a', 0], 'changed_handles': ['z', 'a'], 'bijective': True}), ({'slots': ['b', 'd', 'a'], 'i': 0, 'j': 2}, {'slots': ['a', 'd', 'b'], 'positions': {'a': 0, 'd': 1, 'b': 2}, 'first_moved': ['b', 2], 'second_moved': ['a', 0], 'changed_handles': ['b', 'a'], 'bijective': True}), ({'slots': ['a', 'b', 'c', 'd'], 'i': 1, 'j': 3}, {'slots': ['a', 'd', 'c', 'b'], 'positions': {'a': 0, 'd': 1, 'c': 2, 'b': 3}, 'first_moved': ['b', 3], 'second_moved': ['d', 1], 'changed_handles': ['b', 'd'], 'bijective': True}), ({'slots': ['x', 'y', 'z'], 'i': 1, 'j': 1}, {'slots': ['x', 'y', 'z'], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'first_moved': ['y', 1], 'second_moved': ['y', 1], 'changed_handles': [], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 0}, {'slots': ['u', 'r', 's', 't', 'q'], 'positions': {'u': 0, 'r': 1, 's': 2, 't': 3, 'q': 4}, 'first_moved': ['u', 0], 'second_moved': ['q', 4], 'changed_handles': ['u', 'q'], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 2, 'j': 4}, {'slots': ['q', 'r', 'u', 't', 's'], 'positions': {'q': 0, 'r': 1, 'u': 2, 't': 3, 's': 4}, 'first_moved': ['s', 4], 'second_moved': ['u', 2], 'changed_handles': ['s', 'u'], 'bijective': True})], [({'slots': ['a'], 'i': 0, 'j': 0}, {'slots': ['a'], 'positions': {'a': 0}, 'first_moved': ['a', 0], 'second_moved': ['a', 0], 'changed_handles': [], 'bijective': True}), ({'slots': ['z', 'a'], 'i': 0, 'j': 1}, {'slots': ['a', 'z'], 'positions': {'a': 0, 'z': 1}, 'first_moved': ['z', 1], 'second_moved': ['a', 0], 'changed_handles': ['z', 'a'], 'bijective': True}), ({'slots': ['b', 'd', 'a'], 'i': 0, 'j': 2}, {'slots': ['a', 'd', 'b'], 'positions': {'a': 0, 'd': 1, 'b': 2}, 'first_moved': ['b', 2], 'second_moved': ['a', 0], 'changed_handles': ['b', 'a'], 'bijective': True}), ({'slots': ['a', 'b', 'c', 'd'], 'i': 1, 'j': 3}, {'slots': ['a', 'd', 'c', 'b'], 'positions': {'a': 0, 'd': 1, 'c': 2, 'b': 3}, 'first_moved': ['b', 3], 'second_moved': ['d', 1], 'changed_handles': ['b', 'd'], 'bijective': True}), ({'slots': ['x', 'y', 'z'], 'i': 1, 'j': 1}, {'slots': ['x', 'y', 'z'], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'first_moved': ['y', 1], 'second_moved': ['y', 1], 'changed_handles': [], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 0}, {'slots': ['u', 'r', 's', 't', 'q'], 'positions': {'u': 0, 'r': 1, 's': 2, 't': 3, 'q': 4}, 'first_moved': ['u', 0], 'second_moved': ['q', 4], 'changed_handles': ['u', 'q'], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 3, 'j': 0}, {'slots': ['t', 'r', 's', 'q', 'u'], 'positions': {'t': 0, 'r': 1, 's': 2, 'q': 3, 'u': 4}, 'first_moved': ['t', 0], 'second_moved': ['q', 3], 'changed_handles': ['t', 'q'], 'bijective': True})], [({'slots': ['a'], 'i': 0, 'j': 0}, {'slots': ['a'], 'positions': {'a': 0}, 'first_moved': ['a', 0], 'second_moved': ['a', 0], 'changed_handles': [], 'bijective': True}), ({'slots': ['z', 'a'], 'i': 0, 'j': 1}, {'slots': ['a', 'z'], 'positions': {'a': 0, 'z': 1}, 'first_moved': ['z', 1], 'second_moved': ['a', 0], 'changed_handles': ['z', 'a'], 'bijective': True}), ({'slots': ['b', 'd', 'a'], 'i': 0, 'j': 2}, {'slots': ['a', 'd', 'b'], 'positions': {'a': 0, 'd': 1, 'b': 2}, 'first_moved': ['b', 2], 'second_moved': ['a', 0], 'changed_handles': ['b', 'a'], 'bijective': True}), ({'slots': ['a', 'b', 'c', 'd'], 'i': 1, 'j': 3}, {'slots': ['a', 'd', 'c', 'b'], 'positions': {'a': 0, 'd': 1, 'c': 2, 'b': 3}, 'first_moved': ['b', 3], 'second_moved': ['d', 1], 'changed_handles': ['b', 'd'], 'bijective': True}), ({'slots': ['x', 'y', 'z'], 'i': 1, 'j': 1}, {'slots': ['x', 'y', 'z'], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'first_moved': ['y', 1], 'second_moved': ['y', 1], 'changed_handles': [], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 0}, {'slots': ['u', 'r', 's', 't', 'q'], 'positions': {'u': 0, 'r': 1, 's': 2, 't': 3, 'q': 4}, 'first_moved': ['u', 0], 'second_moved': ['q', 4], 'changed_handles': ['u', 'q'], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 1}, {'slots': ['q', 'u', 's', 't', 'r'], 'positions': {'q': 0, 'u': 1, 's': 2, 't': 3, 'r': 4}, 'first_moved': ['u', 1], 'second_moved': ['r', 4], 'changed_handles': ['u', 'r'], 'bijective': True})], [({'slots': ['a'], 'i': 0, 'j': 0}, {'slots': ['a'], 'positions': {'a': 0}, 'first_moved': ['a', 0], 'second_moved': ['a', 0], 'changed_handles': [], 'bijective': True}), ({'slots': ['z', 'a'], 'i': 0, 'j': 1}, {'slots': ['a', 'z'], 'positions': {'a': 0, 'z': 1}, 'first_moved': ['z', 1], 'second_moved': ['a', 0], 'changed_handles': ['z', 'a'], 'bijective': True}), ({'slots': ['b', 'd', 'a'], 'i': 0, 'j': 2}, {'slots': ['a', 'd', 'b'], 'positions': {'a': 0, 'd': 1, 'b': 2}, 'first_moved': ['b', 2], 'second_moved': ['a', 0], 'changed_handles': ['b', 'a'], 'bijective': True}), ({'slots': ['a', 'b', 'c', 'd'], 'i': 1, 'j': 3}, {'slots': ['a', 'd', 'c', 'b'], 'positions': {'a': 0, 'd': 1, 'c': 2, 'b': 3}, 'first_moved': ['b', 3], 'second_moved': ['d', 1], 'changed_handles': ['b', 'd'], 'bijective': True}), ({'slots': ['x', 'y', 'z'], 'i': 1, 'j': 1}, {'slots': ['x', 'y', 'z'], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'first_moved': ['y', 1], 'second_moved': ['y', 1], 'changed_handles': [], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 4, 'j': 0}, {'slots': ['u', 'r', 's', 't', 'q'], 'positions': {'u': 0, 'r': 1, 's': 2, 't': 3, 'q': 4}, 'first_moved': ['u', 0], 'second_moved': ['q', 4], 'changed_handles': ['u', 'q'], 'bijective': True}), ({'slots': ['q', 'r', 's', 't', 'u'], 'i': 0, 'j': 2}, {'slots': ['s', 'r', 'q', 't', 'u'], 'positions': {'s': 0, 'r': 1, 'q': 2, 't': 3, 'u': 4}, 'first_moved': ['q', 2], 'second_moved': ['s', 0], 'changed_handles': ['q', 's'], 'bijective': True})]][N-1]
check('regression certificate 1', solve(cases[0][0]), cases[0][1])
check('regression certificate 2', solve(cases[1][0]), cases[1][1])
check('regression certificate 3', solve(cases[2][0]), cases[2][1])
check('regression certificate 4', solve(cases[3][0]), cases[3][1])
check('regression certificate 5', solve(cases[4][0]), cases[4][1])
check('regression certificate 6', solve(cases[5][0]), cases[5][1])
check('variant-dependent certificate', solve(cases[6][0]), cases[6][1])
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 certificate 1 | {'bijective': True, 'changed_handles': [], 'first_moved': ['a', 0], 'positions': {'a': 0}, 'second_moved': ['a', 0], 'slots': ['a']} | {'bijective': True, 'changed_handles': [], 'first_moved': ['a', 0], 'positions': {'a': 0}, 'second_moved': ['a', 0], 'slots': ['a']} | Passed |
| regression certificate 2 | {'bijective': True, 'changed_handles': ['z', 'a'], 'first_moved': ['z', 1], 'positions': {'a': 0, 'z': 1}, 'second_moved': ['a', 0], 'slots': ['a', 'z']} | {'bijective': True, 'changed_handles': ['z', 'a'], 'first_moved': ['z', 1], 'positions': {'a': 0, 'z': 1}, 'second_moved': ['a', 0], 'slots': ['a', 'z']} | Passed |
| regression certificate 3 | {'bijective': True, 'changed_handles': ['b', 'a'], 'first_moved': ['b', 2], 'positions': {'a': 0, 'b': 2, 'd': 1}, 'second_moved': ['a', 0], 'slots': ['a', 'd', 'b']} | {'bijective': True, 'changed_handles': ['b', 'a'], 'first_moved': ['b', 2], 'positions': {'a': 0, 'b': 2, 'd': 1}, 'second_moved': ['a', 0], 'slots': ['a', 'd', 'b']} | Passed |
| regression certificate 4 | {'bijective': True, 'changed_handles': ['b', 'd'], 'first_moved': ['b', 3], 'positions': {'a': 0, 'b': 3, 'c': 2, 'd': 1}, 'second_moved': ['d', 1], 'slots': ['a', 'd', 'c', 'b']} | {'bijective': True, 'changed_handles': ['b', 'd'], 'first_moved': ['b', 3], 'positions': {'a': 0, 'b': 3, 'c': 2, 'd': 1}, 'second_moved': ['d', 1], 'slots': ['a', 'd', 'c', 'b']} | Passed |
| regression certificate 5 | {'bijective': True, 'changed_handles': [], 'first_moved': ['y', 1], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'second_moved': ['y', 1], 'slots': ['x', 'y', 'z']} | {'bijective': True, 'changed_handles': [], 'first_moved': ['y', 1], 'positions': {'x': 0, 'y': 1, 'z': 2}, 'second_moved': ['y', 1], 'slots': ['x', 'y', 'z']} | Passed |
| regression certificate 6 | {'bijective': True, 'changed_handles': ['u', 'q'], 'first_moved': ['u', 0], 'positions': {'q': 4, 'r': 1, 's': 2, 't': 3, 'u': 0}, 'second_moved': ['q', 4], 'slots': ['u', 'r', 's', 't', 'q']} | {'bijective': True, 'changed_handles': ['u', 'q'], 'first_moved': ['u', 0], 'positions': {'q': 4, 'r': 1, 's': 2, 't': 3, 'u': 0}, 'second_moved': ['q', 4], 'slots': ['u', 'r', 's', 't', 'q']} | Passed |
| variant-dependent certificate | {'bijective': True, 'changed_handles': ['r', 't'], 'first_moved': ['r', 3], 'positions': {'q': 0, 'r': 3, 's': 2, 't': 1, 'u': 4}, 'second_moved': ['t', 1], 'slots': ['q', 't', 's', 'r', 'u']} | {'bijective': True, 'changed_handles': ['r', 't'], 'first_moved': ['r', 3], 'positions': {'q': 0, 'r': 3, 's': 2, 't': 1, 'u': 4}, 'second_moved': ['t', 1], 'slots': ['q', 't', 's', 'r', 'u']} | Passed |
SHA-256 / 11b6a541e151d74965dd2a997fb0e3bdd4c125367f19c05d25868f2de45aad1e
Verification & scope
A stipulated offline diagnostic model; it does not implement a production allocator, concurrency protocol, or complete heap library. 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:43:29.570701+00:00.
Case digest / 5a9ce8c7d91e32c779a1f6e43eb5a0dde2b482c8f236356479d8e7d91acf0188