{"abstract":"Instruction swapping ignores a write after an earlier read.","category":"Compiler transformation correctness","checks":7,"contract":"Return whether two adjacent pure register instructions can swap; each read/write collection is a set of register names, and any RAW, WAR or WAW conflict forbids swapping. Memory and control effects are excluded.","contract_signature":"r1, w1, r2, w2","evaluation_group":"model-c0cf51f8d7e0c529","failed_approach":"Adding WAR checks still allows two writes to exchange final register contents.","family":"z-compilers-schedule-antidependency","id":"FA-11486","implementations":{"attempt":{"sha256":"770c77a193e858d398010cc5e48a16132c73fd03041433054c0a9c820ca45aa2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(r1, w1, r2, w2):\n    return not ((set(w1) & set(r2)) or (set(r1) & set(w2)))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nx = 'r'+str(N)\ny = 'r'+str(N+1)\ncheck('empty', solve([],[],[],[]), True)\ncheck('RAW', solve([],[x],[x],[]), False)\ncheck('WAR', solve([x],[],[],[x]), False)\ncheck('WAW', solve([],[x],[],[x]), False)\ncheck('read sharing', solve([x],[],[x],[]), True)\ncheck('disjoint writes', solve([],[x],[],[y]), True)\ncheck('mixed dependence', solve([y],[x],[x],[y]), False)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"bb9d8f3f23b3d6ea6add58e8369114a853426354a27bb25ccc35450ce711e41c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(r1, w1, r2, w2):\n    return not (set(w1) & set(r2))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nx = 'r'+str(N)\ny = 'r'+str(N+1)\ncheck('empty', solve([],[],[],[]), True)\ncheck('RAW', solve([],[x],[x],[]), False)\ncheck('WAR', solve([x],[],[],[x]), False)\ncheck('WAW', solve([],[x],[],[x]), False)\ncheck('read sharing', solve([x],[],[x],[]), True)\ncheck('disjoint writes', solve([],[x],[],[y]), True)\ncheck('mixed dependence', solve([y],[x],[x],[y]), False)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":" 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"z-compilers-schedule-antidependency","generated_at":"2026-09-29T14:38:48.404385+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic miniature compiler-pass model; inputs are explicit IR facts, not a production compiler.","root_cause":"Scheduling checks only read-after-write dependencies.","sha256":"a4928c522be2f751003195557fa321a74abe197c96016291cd4b2d0b1e55a52a","title":"Instruction swapping ignores a write after an earlier read · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":37.388,"exit_code":1,"observations":[{"actual":true,"check":"empty","expected":true,"passed":true},{"actual":false,"check":"RAW","expected":false,"passed":true},{"actual":false,"check":"WAR","expected":false,"passed":true},{"actual":true,"check":"WAW","expected":false,"passed":false},{"actual":true,"check":"read sharing","expected":true,"passed":true},{"actual":true,"check":"disjoint writes","expected":true,"passed":true},{"actual":false,"check":"mixed dependence","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"RAW\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"WAR\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"WAW\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"read sharing\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"disjoint writes\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"mixed dependence\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.765,"exit_code":1,"observations":[{"actual":true,"check":"empty","expected":true,"passed":true},{"actual":false,"check":"RAW","expected":false,"passed":true},{"actual":true,"check":"WAR","expected":false,"passed":false},{"actual":true,"check":"WAW","expected":false,"passed":false},{"actual":true,"check":"read sharing","expected":true,"passed":true},{"actual":true,"check":"disjoint writes","expected":true,"passed":true},{"actual":false,"check":"mixed dependence","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"empty\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"RAW\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"WAR\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"WAW\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"read sharing\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"disjoint writes\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"mixed dependence\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}