FAILURE MAP
← Case archive

FA-40280 / Heap invariants / Member archive

Indexed heap swap captures the displaced identity before mutation · case 05

The bounded indexed swap certificate reports an incorrect second moved.

Member previewVariant 5 · 3 implementations · 7 checks per implementation

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.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression certificate 2{"bijective": true, "changed_handles": ["z", "a"], "first_moved": ["z", 1], "positions": {"a": 0, "z": 1}, "second_moved": ["z", 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

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 ↗