{"abstract":"Arguments needing two or more prefixes lose their high bytes.","category":"Bytecode virtual machines","checks":7,"contract":"Two-byte wordcode (opcode, arg). EXTENDED_ARG (144) prefixes build wider arguments: each prefix ORs its byte into an accumulator that is then shifted left 8; the real instruction ORs its own byte in and resets the accumulator. Each decoded instruction reports [start of its first prefix, own offset, name, full arg, jump target in bytes]: JUMP_FORWARD (110) targets the next instruction plus 2*arg, JUMP_ABSOLUTE (113) targets 2*arg. A prefix at the end reports [\"dangling-extended-arg\", start]. A trailing odd byte is ignored.","evaluation_group":"w2-bytecode-virtual-machines-extended-arg-wordcode","failed_approach":"Shifting before OR-ing leaves the last prefix byte unshifted relative to the final argument.","family":"w2-bytecode-virtual-machines-extended-arg-wordcode-prefix-accumulation","id":"FA-90281","implementations":{"attempt":{"sha256":"7b7907224d96d54c2e43fea8a3b0af182144427008f4b15e289f0a74a70e3b57","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(code):\n    names = {100: 'LOAD_CONST', 110: 'JUMP_FORWARD', 113: 'JUMP_ABSOLUTE', 83: 'RETURN_VALUE', 9: 'NOP'}\n    out = []\n    ext = 0\n    start = None\n    for off in range(0, len(code) - 1, 2):\n        op, arg = code[off], code[off + 1]\n        if start is None:\n            start = off\n        if op == 144:\n            ext = (ext << 8) | arg\n            continue\n        full = ext | arg\n        ext = 0\n        target = None\n        if op == 110:\n            target = off + 2 + full * 2\n        elif op == 113:\n            target = full * 2\n        out.append([start, off, names.get(op, 'UNKNOWN'), full, target])\n        start = None\n    if start is not None:\n        out.append(['dangling-extended-arg', start])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression: prefixed absolute jump',\n   ([100, 1, 144, 1, 113, 4, 83, 0],),\n   [[0, 0, 'LOAD_CONST', 1, None], [2, 4, 'JUMP_ABSOLUTE', 260, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('two prefixes accumulate', ([144, 1, 144, 3, 100, 3],), [[0, 4, 'LOAD_CONST', 66307, None]]),\n  ('prefix does not leak into the next instruction',\n   ([144, 1, 100, 0, 100, 6],),\n   [[0, 2, 'LOAD_CONST', 256, None], [4, 4, 'LOAD_CONST', 6, None]]),\n  ('prefixed forward jump is relative to the next instruction',\n   ([9, 0, 144, 1, 110, 1, 83, 0],),\n   [[0, 0, 'NOP', 0, None], [2, 4, 'JUMP_FORWARD', 257, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('absolute jump target in bytes',\n   ([113, 1, 83, 0],),\n   [[0, 0, 'JUMP_ABSOLUTE', 1, 2], [2, 2, 'RETURN_VALUE', 0, None]]),\n  ('trailing prefix with zero argument',\n   ([100, 1, 144, 0],),\n   [[0, 0, 'LOAD_CONST', 1, None], ['dangling-extended-arg', 2]]),\n  ('control: unknown opcode and odd trailing byte',\n   ([7, 1, 83, 0, 9],),\n   [[0, 0, 'UNKNOWN', 1, None], [2, 2, 'RETURN_VALUE', 0, None]])],\n [('regression: prefixed absolute jump',\n   ([100, 2, 144, 1, 113, 4, 83, 0],),\n   [[0, 0, 'LOAD_CONST', 2, None], [2, 4, 'JUMP_ABSOLUTE', 260, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('two prefixes accumulate', ([144, 1, 144, 4, 100, 3],), [[0, 4, 'LOAD_CONST', 66563, None]]),\n  ('prefix does not leak into the next instruction',\n   ([144, 1, 100, 0, 100, 7],),\n   [[0, 2, 'LOAD_CONST', 256, None], [4, 4, 'LOAD_CONST', 7, None]]),\n  ('prefixed forward jump is relative to the next instruction',\n   ([9, 0, 144, 1, 110, 2, 83, 0],),\n   [[0, 0, 'NOP', 0, None], [2, 4, 'JUMP_FORWARD', 258, 522], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('absolute jump target in bytes',\n   ([113, 2, 83, 0],),\n   [[0, 0, 'JUMP_ABSOLUTE', 2, 4], [2, 2, 'RETURN_VALUE', 0, None]]),\n  ('trailing prefix with zero argument',\n   ([100, 2, 144, 0],),\n   [[0, 0, 'LOAD_CONST', 2, None], ['dangling-extended-arg', 2]]),\n  ('control: unknown opcode and odd trailing byte',\n   ([7, 2, 83, 0, 9],),\n   [[0, 0, 'UNKNOWN', 2, None], [2, 2, 'RETURN_VALUE', 0, None]])],\n [('regression: prefixed absolute jump',\n   ([100, 3, 144, 1, 113, 4, 83, 0],),\n   [[0, 0, 'LOAD_CONST', 3, None], [2, 4, 'JUMP_ABSOLUTE', 260, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('two prefixes accumulate', ([144, 1, 144, 5, 100, 3],), [[0, 4, 'LOAD_CONST', 66819, None]]),\n  ('prefix does not leak into the next instruction',\n   ([144, 1, 100, 0, 100, 8],),\n   [[0, 2, 'LOAD_CONST', 256, None], [4, 4, 'LOAD_CONST', 8, None]]),\n  ('prefixed forward jump is relative to the next instruction',\n   ([9, 0, 144, 1, 110, 3, 83, 0],),\n   [[0, 0, 'NOP', 0, None], [2, 4, 'JUMP_FORWARD', 259, 524], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('absolute jump target in bytes',\n   ([113, 3, 83, 0],),\n   [[0, 0, 'JUMP_ABSOLUTE', 3, 6], [2, 2, 'RETURN_VALUE', 0, None]]),\n  ('trailing prefix with zero argument',\n   ([100, 3, 144, 0],),\n   [[0, 0, 'LOAD_CONST', 3, None], ['dangling-extended-arg', 2]]),\n  ('control: unknown opcode and odd trailing byte',\n   ([7, 3, 83, 0, 9],),\n   [[0, 0, 'UNKNOWN', 3, None], [2, 2, 'RETURN_VALUE', 0, None]])],\n [('regression: prefixed absolute jump',\n   ([100, 4, 144, 1, 113, 4, 83, 0],),\n   [[0, 0, 'LOAD_CONST', 4, None], [2, 4, 'JUMP_ABSOLUTE', 260, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('two prefixes accumulate', ([144, 1, 144, 6, 100, 3],), [[0, 4, 'LOAD_CONST', 67075, None]]),\n  ('prefix does not leak into the next instruction',\n   ([144, 1, 100, 0, 100, 9],),\n   [[0, 2, 'LOAD_CONST', 256, None], [4, 4, 'LOAD_CONST', 9, None]]),\n  ('prefixed forward jump is relative to the next instruction',\n   ([9, 0, 144, 1, 110, 4, 83, 0],),\n   [[0, 0, 'NOP', 0, None], [2, 4, 'JUMP_FORWARD', 260, 526], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('absolute jump target in bytes',\n   ([113, 4, 83, 0],),\n   [[0, 0, 'JUMP_ABSOLUTE', 4, 8], [2, 2, 'RETURN_VALUE', 0, None]]),\n  ('trailing prefix with zero argument',\n   ([100, 4, 144, 0],),\n   [[0, 0, 'LOAD_CONST', 4, None], ['dangling-extended-arg', 2]]),\n  ('control: unknown opcode and odd trailing byte',\n   ([7, 4, 83, 0, 9],),\n   [[0, 0, 'UNKNOWN', 4, None], [2, 2, 'RETURN_VALUE', 0, None]])],\n [('regression: prefixed absolute jump',\n   ([100, 5, 144, 1, 113, 4, 83, 0],),\n   [[0, 0, 'LOAD_CONST', 5, None], [2, 4, 'JUMP_ABSOLUTE', 260, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('two prefixes accumulate', ([144, 1, 144, 7, 100, 3],), [[0, 4, 'LOAD_CONST', 67331, None]]),\n  ('prefix does not leak into the next instruction',\n   ([144, 1, 100, 0, 100, 10],),\n   [[0, 2, 'LOAD_CONST', 256, None], [4, 4, 'LOAD_CONST', 10, None]]),\n  ('prefixed forward jump is relative to the next instruction',\n   ([9, 0, 144, 1, 110, 5, 83, 0],),\n   [[0, 0, 'NOP', 0, None], [2, 4, 'JUMP_FORWARD', 261, 528], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('absolute jump target in bytes',\n   ([113, 5, 83, 0],),\n   [[0, 0, 'JUMP_ABSOLUTE', 5, 10], [2, 2, 'RETURN_VALUE', 0, None]]),\n  ('trailing prefix with zero argument',\n   ([100, 5, 144, 0],),\n   [[0, 0, 'LOAD_CONST', 5, None], ['dangling-extended-arg', 2]]),\n  ('control: unknown opcode and odd trailing byte',\n   ([7, 5, 83, 0, 9],),\n   [[0, 0, 'UNKNOWN', 5, None], [2, 2, 'RETURN_VALUE', 0, None]])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, solve(*args), expected)\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":"bd2832e0e08403fd09b0e811003f9ff293ee9473b1e3c89c198dbc77711d344d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(code):\n    names = {100: 'LOAD_CONST', 110: 'JUMP_FORWARD', 113: 'JUMP_ABSOLUTE', 83: 'RETURN_VALUE', 9: 'NOP'}\n    out = []\n    ext = 0\n    start = None\n    for off in range(0, len(code) - 1, 2):\n        op, arg = code[off], code[off + 1]\n        if start is None:\n            start = off\n        if op == 144:\n            ext = arg << 8\n            continue\n        full = ext | arg\n        ext = 0\n        target = None\n        if op == 110:\n            target = off + 2 + full * 2\n        elif op == 113:\n            target = full * 2\n        out.append([start, off, names.get(op, 'UNKNOWN'), full, target])\n        start = None\n    if start is not None:\n        out.append(['dangling-extended-arg', start])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression: prefixed absolute jump',\n   ([100, 1, 144, 1, 113, 4, 83, 0],),\n   [[0, 0, 'LOAD_CONST', 1, None], [2, 4, 'JUMP_ABSOLUTE', 260, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('two prefixes accumulate', ([144, 1, 144, 3, 100, 3],), [[0, 4, 'LOAD_CONST', 66307, None]]),\n  ('prefix does not leak into the next instruction',\n   ([144, 1, 100, 0, 100, 6],),\n   [[0, 2, 'LOAD_CONST', 256, None], [4, 4, 'LOAD_CONST', 6, None]]),\n  ('prefixed forward jump is relative to the next instruction',\n   ([9, 0, 144, 1, 110, 1, 83, 0],),\n   [[0, 0, 'NOP', 0, None], [2, 4, 'JUMP_FORWARD', 257, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('absolute jump target in bytes',\n   ([113, 1, 83, 0],),\n   [[0, 0, 'JUMP_ABSOLUTE', 1, 2], [2, 2, 'RETURN_VALUE', 0, None]]),\n  ('trailing prefix with zero argument',\n   ([100, 1, 144, 0],),\n   [[0, 0, 'LOAD_CONST', 1, None], ['dangling-extended-arg', 2]]),\n  ('control: unknown opcode and odd trailing byte',\n   ([7, 1, 83, 0, 9],),\n   [[0, 0, 'UNKNOWN', 1, None], [2, 2, 'RETURN_VALUE', 0, None]])],\n [('regression: prefixed absolute jump',\n   ([100, 2, 144, 1, 113, 4, 83, 0],),\n   [[0, 0, 'LOAD_CONST', 2, None], [2, 4, 'JUMP_ABSOLUTE', 260, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('two prefixes accumulate', ([144, 1, 144, 4, 100, 3],), [[0, 4, 'LOAD_CONST', 66563, None]]),\n  ('prefix does not leak into the next instruction',\n   ([144, 1, 100, 0, 100, 7],),\n   [[0, 2, 'LOAD_CONST', 256, None], [4, 4, 'LOAD_CONST', 7, None]]),\n  ('prefixed forward jump is relative to the next instruction',\n   ([9, 0, 144, 1, 110, 2, 83, 0],),\n   [[0, 0, 'NOP', 0, None], [2, 4, 'JUMP_FORWARD', 258, 522], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('absolute jump target in bytes',\n   ([113, 2, 83, 0],),\n   [[0, 0, 'JUMP_ABSOLUTE', 2, 4], [2, 2, 'RETURN_VALUE', 0, None]]),\n  ('trailing prefix with zero argument',\n   ([100, 2, 144, 0],),\n   [[0, 0, 'LOAD_CONST', 2, None], ['dangling-extended-arg', 2]]),\n  ('control: unknown opcode and odd trailing byte',\n   ([7, 2, 83, 0, 9],),\n   [[0, 0, 'UNKNOWN', 2, None], [2, 2, 'RETURN_VALUE', 0, None]])],\n [('regression: prefixed absolute jump',\n   ([100, 3, 144, 1, 113, 4, 83, 0],),\n   [[0, 0, 'LOAD_CONST', 3, None], [2, 4, 'JUMP_ABSOLUTE', 260, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('two prefixes accumulate', ([144, 1, 144, 5, 100, 3],), [[0, 4, 'LOAD_CONST', 66819, None]]),\n  ('prefix does not leak into the next instruction',\n   ([144, 1, 100, 0, 100, 8],),\n   [[0, 2, 'LOAD_CONST', 256, None], [4, 4, 'LOAD_CONST', 8, None]]),\n  ('prefixed forward jump is relative to the next instruction',\n   ([9, 0, 144, 1, 110, 3, 83, 0],),\n   [[0, 0, 'NOP', 0, None], [2, 4, 'JUMP_FORWARD', 259, 524], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('absolute jump target in bytes',\n   ([113, 3, 83, 0],),\n   [[0, 0, 'JUMP_ABSOLUTE', 3, 6], [2, 2, 'RETURN_VALUE', 0, None]]),\n  ('trailing prefix with zero argument',\n   ([100, 3, 144, 0],),\n   [[0, 0, 'LOAD_CONST', 3, None], ['dangling-extended-arg', 2]]),\n  ('control: unknown opcode and odd trailing byte',\n   ([7, 3, 83, 0, 9],),\n   [[0, 0, 'UNKNOWN', 3, None], [2, 2, 'RETURN_VALUE', 0, None]])],\n [('regression: prefixed absolute jump',\n   ([100, 4, 144, 1, 113, 4, 83, 0],),\n   [[0, 0, 'LOAD_CONST', 4, None], [2, 4, 'JUMP_ABSOLUTE', 260, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('two prefixes accumulate', ([144, 1, 144, 6, 100, 3],), [[0, 4, 'LOAD_CONST', 67075, None]]),\n  ('prefix does not leak into the next instruction',\n   ([144, 1, 100, 0, 100, 9],),\n   [[0, 2, 'LOAD_CONST', 256, None], [4, 4, 'LOAD_CONST', 9, None]]),\n  ('prefixed forward jump is relative to the next instruction',\n   ([9, 0, 144, 1, 110, 4, 83, 0],),\n   [[0, 0, 'NOP', 0, None], [2, 4, 'JUMP_FORWARD', 260, 526], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('absolute jump target in bytes',\n   ([113, 4, 83, 0],),\n   [[0, 0, 'JUMP_ABSOLUTE', 4, 8], [2, 2, 'RETURN_VALUE', 0, None]]),\n  ('trailing prefix with zero argument',\n   ([100, 4, 144, 0],),\n   [[0, 0, 'LOAD_CONST', 4, None], ['dangling-extended-arg', 2]]),\n  ('control: unknown opcode and odd trailing byte',\n   ([7, 4, 83, 0, 9],),\n   [[0, 0, 'UNKNOWN', 4, None], [2, 2, 'RETURN_VALUE', 0, None]])],\n [('regression: prefixed absolute jump',\n   ([100, 5, 144, 1, 113, 4, 83, 0],),\n   [[0, 0, 'LOAD_CONST', 5, None], [2, 4, 'JUMP_ABSOLUTE', 260, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('two prefixes accumulate', ([144, 1, 144, 7, 100, 3],), [[0, 4, 'LOAD_CONST', 67331, None]]),\n  ('prefix does not leak into the next instruction',\n   ([144, 1, 100, 0, 100, 10],),\n   [[0, 2, 'LOAD_CONST', 256, None], [4, 4, 'LOAD_CONST', 10, None]]),\n  ('prefixed forward jump is relative to the next instruction',\n   ([9, 0, 144, 1, 110, 5, 83, 0],),\n   [[0, 0, 'NOP', 0, None], [2, 4, 'JUMP_FORWARD', 261, 528], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('absolute jump target in bytes',\n   ([113, 5, 83, 0],),\n   [[0, 0, 'JUMP_ABSOLUTE', 5, 10], [2, 2, 'RETURN_VALUE', 0, None]]),\n  ('trailing prefix with zero argument',\n   ([100, 5, 144, 0],),\n   [[0, 0, 'LOAD_CONST', 5, None], ['dangling-extended-arg', 2]]),\n  ('control: unknown opcode and odd trailing byte',\n   ([7, 5, 83, 0, 9],),\n   [[0, 0, 'UNKNOWN', 5, None], [2, 2, 'RETURN_VALUE', 0, None]])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, solve(*args), expected)\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"},"fixed":{"sha256":"726ae4a7a646ac218f5ff9541282d50975e4ce08bafd0b6788f45cd018ca7edd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(code):\n    names = {100: 'LOAD_CONST', 110: 'JUMP_FORWARD', 113: 'JUMP_ABSOLUTE', 83: 'RETURN_VALUE', 9: 'NOP'}\n    out = []\n    ext = 0\n    start = None\n    for off in range(0, len(code) - 1, 2):\n        op, arg = code[off], code[off + 1]\n        if start is None:\n            start = off\n        if op == 144:\n            ext = (ext | arg) << 8\n            continue\n        full = ext | arg\n        ext = 0\n        target = None\n        if op == 110:\n            target = off + 2 + full * 2\n        elif op == 113:\n            target = full * 2\n        out.append([start, off, names.get(op, 'UNKNOWN'), full, target])\n        start = None\n    if start is not None:\n        out.append(['dangling-extended-arg', start])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression: prefixed absolute jump',\n   ([100, 1, 144, 1, 113, 4, 83, 0],),\n   [[0, 0, 'LOAD_CONST', 1, None], [2, 4, 'JUMP_ABSOLUTE', 260, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('two prefixes accumulate', ([144, 1, 144, 3, 100, 3],), [[0, 4, 'LOAD_CONST', 66307, None]]),\n  ('prefix does not leak into the next instruction',\n   ([144, 1, 100, 0, 100, 6],),\n   [[0, 2, 'LOAD_CONST', 256, None], [4, 4, 'LOAD_CONST', 6, None]]),\n  ('prefixed forward jump is relative to the next instruction',\n   ([9, 0, 144, 1, 110, 1, 83, 0],),\n   [[0, 0, 'NOP', 0, None], [2, 4, 'JUMP_FORWARD', 257, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('absolute jump target in bytes',\n   ([113, 1, 83, 0],),\n   [[0, 0, 'JUMP_ABSOLUTE', 1, 2], [2, 2, 'RETURN_VALUE', 0, None]]),\n  ('trailing prefix with zero argument',\n   ([100, 1, 144, 0],),\n   [[0, 0, 'LOAD_CONST', 1, None], ['dangling-extended-arg', 2]]),\n  ('control: unknown opcode and odd trailing byte',\n   ([7, 1, 83, 0, 9],),\n   [[0, 0, 'UNKNOWN', 1, None], [2, 2, 'RETURN_VALUE', 0, None]])],\n [('regression: prefixed absolute jump',\n   ([100, 2, 144, 1, 113, 4, 83, 0],),\n   [[0, 0, 'LOAD_CONST', 2, None], [2, 4, 'JUMP_ABSOLUTE', 260, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('two prefixes accumulate', ([144, 1, 144, 4, 100, 3],), [[0, 4, 'LOAD_CONST', 66563, None]]),\n  ('prefix does not leak into the next instruction',\n   ([144, 1, 100, 0, 100, 7],),\n   [[0, 2, 'LOAD_CONST', 256, None], [4, 4, 'LOAD_CONST', 7, None]]),\n  ('prefixed forward jump is relative to the next instruction',\n   ([9, 0, 144, 1, 110, 2, 83, 0],),\n   [[0, 0, 'NOP', 0, None], [2, 4, 'JUMP_FORWARD', 258, 522], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('absolute jump target in bytes',\n   ([113, 2, 83, 0],),\n   [[0, 0, 'JUMP_ABSOLUTE', 2, 4], [2, 2, 'RETURN_VALUE', 0, None]]),\n  ('trailing prefix with zero argument',\n   ([100, 2, 144, 0],),\n   [[0, 0, 'LOAD_CONST', 2, None], ['dangling-extended-arg', 2]]),\n  ('control: unknown opcode and odd trailing byte',\n   ([7, 2, 83, 0, 9],),\n   [[0, 0, 'UNKNOWN', 2, None], [2, 2, 'RETURN_VALUE', 0, None]])],\n [('regression: prefixed absolute jump',\n   ([100, 3, 144, 1, 113, 4, 83, 0],),\n   [[0, 0, 'LOAD_CONST', 3, None], [2, 4, 'JUMP_ABSOLUTE', 260, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('two prefixes accumulate', ([144, 1, 144, 5, 100, 3],), [[0, 4, 'LOAD_CONST', 66819, None]]),\n  ('prefix does not leak into the next instruction',\n   ([144, 1, 100, 0, 100, 8],),\n   [[0, 2, 'LOAD_CONST', 256, None], [4, 4, 'LOAD_CONST', 8, None]]),\n  ('prefixed forward jump is relative to the next instruction',\n   ([9, 0, 144, 1, 110, 3, 83, 0],),\n   [[0, 0, 'NOP', 0, None], [2, 4, 'JUMP_FORWARD', 259, 524], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('absolute jump target in bytes',\n   ([113, 3, 83, 0],),\n   [[0, 0, 'JUMP_ABSOLUTE', 3, 6], [2, 2, 'RETURN_VALUE', 0, None]]),\n  ('trailing prefix with zero argument',\n   ([100, 3, 144, 0],),\n   [[0, 0, 'LOAD_CONST', 3, None], ['dangling-extended-arg', 2]]),\n  ('control: unknown opcode and odd trailing byte',\n   ([7, 3, 83, 0, 9],),\n   [[0, 0, 'UNKNOWN', 3, None], [2, 2, 'RETURN_VALUE', 0, None]])],\n [('regression: prefixed absolute jump',\n   ([100, 4, 144, 1, 113, 4, 83, 0],),\n   [[0, 0, 'LOAD_CONST', 4, None], [2, 4, 'JUMP_ABSOLUTE', 260, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('two prefixes accumulate', ([144, 1, 144, 6, 100, 3],), [[0, 4, 'LOAD_CONST', 67075, None]]),\n  ('prefix does not leak into the next instruction',\n   ([144, 1, 100, 0, 100, 9],),\n   [[0, 2, 'LOAD_CONST', 256, None], [4, 4, 'LOAD_CONST', 9, None]]),\n  ('prefixed forward jump is relative to the next instruction',\n   ([9, 0, 144, 1, 110, 4, 83, 0],),\n   [[0, 0, 'NOP', 0, None], [2, 4, 'JUMP_FORWARD', 260, 526], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('absolute jump target in bytes',\n   ([113, 4, 83, 0],),\n   [[0, 0, 'JUMP_ABSOLUTE', 4, 8], [2, 2, 'RETURN_VALUE', 0, None]]),\n  ('trailing prefix with zero argument',\n   ([100, 4, 144, 0],),\n   [[0, 0, 'LOAD_CONST', 4, None], ['dangling-extended-arg', 2]]),\n  ('control: unknown opcode and odd trailing byte',\n   ([7, 4, 83, 0, 9],),\n   [[0, 0, 'UNKNOWN', 4, None], [2, 2, 'RETURN_VALUE', 0, None]])],\n [('regression: prefixed absolute jump',\n   ([100, 5, 144, 1, 113, 4, 83, 0],),\n   [[0, 0, 'LOAD_CONST', 5, None], [2, 4, 'JUMP_ABSOLUTE', 260, 520], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('two prefixes accumulate', ([144, 1, 144, 7, 100, 3],), [[0, 4, 'LOAD_CONST', 67331, None]]),\n  ('prefix does not leak into the next instruction',\n   ([144, 1, 100, 0, 100, 10],),\n   [[0, 2, 'LOAD_CONST', 256, None], [4, 4, 'LOAD_CONST', 10, None]]),\n  ('prefixed forward jump is relative to the next instruction',\n   ([9, 0, 144, 1, 110, 5, 83, 0],),\n   [[0, 0, 'NOP', 0, None], [2, 4, 'JUMP_FORWARD', 261, 528], [6, 6, 'RETURN_VALUE', 0, None]]),\n  ('absolute jump target in bytes',\n   ([113, 5, 83, 0],),\n   [[0, 0, 'JUMP_ABSOLUTE', 5, 10], [2, 2, 'RETURN_VALUE', 0, None]]),\n  ('trailing prefix with zero argument',\n   ([100, 5, 144, 0],),\n   [[0, 0, 'LOAD_CONST', 5, None], ['dangling-extended-arg', 2]]),\n  ('control: unknown opcode and odd trailing byte',\n   ([7, 5, 83, 0, 9],),\n   [[0, 0, 'UNKNOWN', 5, None], [2, 2, 'RETURN_VALUE', 0, None]])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, solve(*args), expected)\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":"A deterministic, bounded teaching model of one bytecode virtual machine mechanism with a stipulated instruction encoding; it is not a production VM and claims no conformance to any real specification. 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":"w2-bytecode-virtual-machines-extended-arg-wordcode-prefix-accumulation","generated_at":"2026-09-29T14:51:25.172264+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Instruction prefixes change argument width and jump targets in wordcode interpreters.","repair":"OR the prefix byte into the accumulator, then shift left by 8.","root_cause":"Each prefix overwrites the accumulator instead of merging with it.","sha256":"2476f5fd90ac67242c38cc4d91f7cba5aeeeac08b896667dda5a1c651c5256e6","title":"Wordcode prefixes: only the last EXTENDED_ARG counts · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":37.763,"exit_code":1,"observations":[{"actual":[[0,0,"LOAD_CONST",1,null],[2,4,"JUMP_ABSOLUTE",5,10],[6,6,"RETURN_VALUE",0,null]],"check":"regression: prefixed absolute jump","expected":[[0,0,"LOAD_CONST",1,null],[2,4,"JUMP_ABSOLUTE",260,520],[6,6,"RETURN_VALUE",0,null]],"passed":false},{"actual":[[0,4,"LOAD_CONST",259,null]],"check":"two prefixes accumulate","expected":[[0,4,"LOAD_CONST",66307,null]],"passed":false},{"actual":[[0,2,"LOAD_CONST",1,null],[4,4,"LOAD_CONST",6,null]],"check":"prefix does not leak into the next instruction","expected":[[0,2,"LOAD_CONST",256,null],[4,4,"LOAD_CONST",6,null]],"passed":false},{"actual":[[0,0,"NOP",0,null],[2,4,"JUMP_FORWARD",1,8],[6,6,"RETURN_VALUE",0,null]],"check":"prefixed forward jump is relative to the next instruction","expected":[[0,0,"NOP",0,null],[2,4,"JUMP_FORWARD",257,520],[6,6,"RETURN_VALUE",0,null]],"passed":false},{"actual":[[0,0,"JUMP_ABSOLUTE",1,2],[2,2,"RETURN_VALUE",0,null]],"check":"absolute jump target in bytes","expected":[[0,0,"JUMP_ABSOLUTE",1,2],[2,2,"RETURN_VALUE",0,null]],"passed":true},{"actual":[[0,0,"LOAD_CONST",1,null],["dangling-extended-arg",2]],"check":"trailing prefix with zero argument","expected":[[0,0,"LOAD_CONST",1,null],["dangling-extended-arg",2]],"passed":true},{"actual":[[0,0,"UNKNOWN",1,null],[2,2,"RETURN_VALUE",0,null]],"check":"control: unknown opcode and odd trailing byte","expected":[[0,0,"UNKNOWN",1,null],[2,2,"RETURN_VALUE",0,null]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: prefixed absolute jump\", \"actual\": [[0, 0, \"LOAD_CONST\", 1, null], [2, 4, \"JUMP_ABSOLUTE\", 5, 10], [6, 6, \"RETURN_VALUE\", 0, null]], \"expected\": [[0, 0, \"LOAD_CONST\", 1, null], [2, 4, \"JUMP_ABSOLUTE\", 260, 520], [6, 6, \"RETURN_VALUE\", 0, null]], \"passed\": false}, {\"check\": \"two prefixes accumulate\", \"actual\": [[0, 4, \"LOAD_CONST\", 259, null]], \"expected\": [[0, 4, \"LOAD_CONST\", 66307, null]], \"passed\": false}, {\"check\": \"prefix does not leak into the next instruction\", \"actual\": [[0, 2, \"LOAD_CONST\", 1, null], [4, 4, \"LOAD_CONST\", 6, null]], \"expected\": [[0, 2, \"LOAD_CONST\", 256, null], [4, 4, \"LOAD_CONST\", 6, null]], \"passed\": false}, {\"check\": \"prefixed forward jump is relative to the next instruction\", \"actual\": [[0, 0, \"NOP\", 0, null], [2, 4, \"JUMP_FORWARD\", 1, 8], [6, 6, \"RETURN_VALUE\", 0, null]], \"expected\": [[0, 0, \"NOP\", 0, null], [2, 4, \"JUMP_FORWARD\", 257, 520], [6, 6, \"RETURN_VALUE\", 0, null]], \"passed\": false}, {\"check\": \"absolute jump target in bytes\", \"actual\": [[0, 0, \"JUMP_ABSOLUTE\", 1, 2], [2, 2, \"RETURN_VALUE\", 0, null]], \"expected\": [[0, 0, \"JUMP_ABSOLUTE\", 1, 2], [2, 2, \"RETURN_VALUE\", 0, null]], \"passed\": true}, {\"check\": \"trailing prefix with zero argument\", \"actual\": [[0, 0, \"LOAD_CONST\", 1, null], [\"dangling-extended-arg\", 2]], \"expected\": [[0, 0, \"LOAD_CONST\", 1, null], [\"dangling-extended-arg\", 2]], \"passed\": true}, {\"check\": \"control: unknown opcode and odd trailing byte\", \"actual\": [[0, 0, \"UNKNOWN\", 1, null], [2, 2, \"RETURN_VALUE\", 0, null]], \"expected\": [[0, 0, \"UNKNOWN\", 1, null], [2, 2, \"RETURN_VALUE\", 0, null]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.446,"exit_code":1,"observations":[{"actual":[[0,0,"LOAD_CONST",1,null],[2,4,"JUMP_ABSOLUTE",260,520],[6,6,"RETURN_VALUE",0,null]],"check":"regression: prefixed absolute jump","expected":[[0,0,"LOAD_CONST",1,null],[2,4,"JUMP_ABSOLUTE",260,520],[6,6,"RETURN_VALUE",0,null]],"passed":true},{"actual":[[0,4,"LOAD_CONST",771,null]],"check":"two prefixes accumulate","expected":[[0,4,"LOAD_CONST",66307,null]],"passed":false},{"actual":[[0,2,"LOAD_CONST",256,null],[4,4,"LOAD_CONST",6,null]],"check":"prefix does not leak into the next instruction","expected":[[0,2,"LOAD_CONST",256,null],[4,4,"LOAD_CONST",6,null]],"passed":true},{"actual":[[0,0,"NOP",0,null],[2,4,"JUMP_FORWARD",257,520],[6,6,"RETURN_VALUE",0,null]],"check":"prefixed forward jump is relative to the next instruction","expected":[[0,0,"NOP",0,null],[2,4,"JUMP_FORWARD",257,520],[6,6,"RETURN_VALUE",0,null]],"passed":true},{"actual":[[0,0,"JUMP_ABSOLUTE",1,2],[2,2,"RETURN_VALUE",0,null]],"check":"absolute jump target in bytes","expected":[[0,0,"JUMP_ABSOLUTE",1,2],[2,2,"RETURN_VALUE",0,null]],"passed":true},{"actual":[[0,0,"LOAD_CONST",1,null],["dangling-extended-arg",2]],"check":"trailing prefix with zero argument","expected":[[0,0,"LOAD_CONST",1,null],["dangling-extended-arg",2]],"passed":true},{"actual":[[0,0,"UNKNOWN",1,null],[2,2,"RETURN_VALUE",0,null]],"check":"control: unknown opcode and odd trailing byte","expected":[[0,0,"UNKNOWN",1,null],[2,2,"RETURN_VALUE",0,null]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: prefixed absolute jump\", \"actual\": [[0, 0, \"LOAD_CONST\", 1, null], [2, 4, \"JUMP_ABSOLUTE\", 260, 520], [6, 6, \"RETURN_VALUE\", 0, null]], \"expected\": [[0, 0, \"LOAD_CONST\", 1, null], [2, 4, \"JUMP_ABSOLUTE\", 260, 520], [6, 6, \"RETURN_VALUE\", 0, null]], \"passed\": true}, {\"check\": \"two prefixes accumulate\", \"actual\": [[0, 4, \"LOAD_CONST\", 771, null]], \"expected\": [[0, 4, \"LOAD_CONST\", 66307, null]], \"passed\": false}, {\"check\": \"prefix does not leak into the next instruction\", \"actual\": [[0, 2, \"LOAD_CONST\", 256, null], [4, 4, \"LOAD_CONST\", 6, null]], \"expected\": [[0, 2, \"LOAD_CONST\", 256, null], [4, 4, \"LOAD_CONST\", 6, null]], \"passed\": true}, {\"check\": \"prefixed forward jump is relative to the next instruction\", \"actual\": [[0, 0, \"NOP\", 0, null], [2, 4, \"JUMP_FORWARD\", 257, 520], [6, 6, \"RETURN_VALUE\", 0, null]], \"expected\": [[0, 0, \"NOP\", 0, null], [2, 4, \"JUMP_FORWARD\", 257, 520], [6, 6, \"RETURN_VALUE\", 0, null]], \"passed\": true}, {\"check\": \"absolute jump target in bytes\", \"actual\": [[0, 0, \"JUMP_ABSOLUTE\", 1, 2], [2, 2, \"RETURN_VALUE\", 0, null]], \"expected\": [[0, 0, \"JUMP_ABSOLUTE\", 1, 2], [2, 2, \"RETURN_VALUE\", 0, null]], \"passed\": true}, {\"check\": \"trailing prefix with zero argument\", \"actual\": [[0, 0, \"LOAD_CONST\", 1, null], [\"dangling-extended-arg\", 2]], \"expected\": [[0, 0, \"LOAD_CONST\", 1, null], [\"dangling-extended-arg\", 2]], \"passed\": true}, {\"check\": \"control: unknown opcode and odd trailing byte\", \"actual\": [[0, 0, \"UNKNOWN\", 1, null], [2, 2, \"RETURN_VALUE\", 0, null]], \"expected\": [[0, 0, \"UNKNOWN\", 1, null], [2, 2, \"RETURN_VALUE\", 0, null]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.008,"exit_code":0,"observations":[{"actual":[[0,0,"LOAD_CONST",1,null],[2,4,"JUMP_ABSOLUTE",260,520],[6,6,"RETURN_VALUE",0,null]],"check":"regression: prefixed absolute jump","expected":[[0,0,"LOAD_CONST",1,null],[2,4,"JUMP_ABSOLUTE",260,520],[6,6,"RETURN_VALUE",0,null]],"passed":true},{"actual":[[0,4,"LOAD_CONST",66307,null]],"check":"two prefixes accumulate","expected":[[0,4,"LOAD_CONST",66307,null]],"passed":true},{"actual":[[0,2,"LOAD_CONST",256,null],[4,4,"LOAD_CONST",6,null]],"check":"prefix does not leak into the next instruction","expected":[[0,2,"LOAD_CONST",256,null],[4,4,"LOAD_CONST",6,null]],"passed":true},{"actual":[[0,0,"NOP",0,null],[2,4,"JUMP_FORWARD",257,520],[6,6,"RETURN_VALUE",0,null]],"check":"prefixed forward jump is relative to the next instruction","expected":[[0,0,"NOP",0,null],[2,4,"JUMP_FORWARD",257,520],[6,6,"RETURN_VALUE",0,null]],"passed":true},{"actual":[[0,0,"JUMP_ABSOLUTE",1,2],[2,2,"RETURN_VALUE",0,null]],"check":"absolute jump target in bytes","expected":[[0,0,"JUMP_ABSOLUTE",1,2],[2,2,"RETURN_VALUE",0,null]],"passed":true},{"actual":[[0,0,"LOAD_CONST",1,null],["dangling-extended-arg",2]],"check":"trailing prefix with zero argument","expected":[[0,0,"LOAD_CONST",1,null],["dangling-extended-arg",2]],"passed":true},{"actual":[[0,0,"UNKNOWN",1,null],[2,2,"RETURN_VALUE",0,null]],"check":"control: unknown opcode and odd trailing byte","expected":[[0,0,"UNKNOWN",1,null],[2,2,"RETURN_VALUE",0,null]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: prefixed absolute jump\", \"actual\": [[0, 0, \"LOAD_CONST\", 1, null], [2, 4, \"JUMP_ABSOLUTE\", 260, 520], [6, 6, \"RETURN_VALUE\", 0, null]], \"expected\": [[0, 0, \"LOAD_CONST\", 1, null], [2, 4, \"JUMP_ABSOLUTE\", 260, 520], [6, 6, \"RETURN_VALUE\", 0, null]], \"passed\": true}, {\"check\": \"two prefixes accumulate\", \"actual\": [[0, 4, \"LOAD_CONST\", 66307, null]], \"expected\": [[0, 4, \"LOAD_CONST\", 66307, null]], \"passed\": true}, {\"check\": \"prefix does not leak into the next instruction\", \"actual\": [[0, 2, \"LOAD_CONST\", 256, null], [4, 4, \"LOAD_CONST\", 6, null]], \"expected\": [[0, 2, \"LOAD_CONST\", 256, null], [4, 4, \"LOAD_CONST\", 6, null]], \"passed\": true}, {\"check\": \"prefixed forward jump is relative to the next instruction\", \"actual\": [[0, 0, \"NOP\", 0, null], [2, 4, \"JUMP_FORWARD\", 257, 520], [6, 6, \"RETURN_VALUE\", 0, null]], \"expected\": [[0, 0, \"NOP\", 0, null], [2, 4, \"JUMP_FORWARD\", 257, 520], [6, 6, \"RETURN_VALUE\", 0, null]], \"passed\": true}, {\"check\": \"absolute jump target in bytes\", \"actual\": [[0, 0, \"JUMP_ABSOLUTE\", 1, 2], [2, 2, \"RETURN_VALUE\", 0, null]], \"expected\": [[0, 0, \"JUMP_ABSOLUTE\", 1, 2], [2, 2, \"RETURN_VALUE\", 0, null]], \"passed\": true}, {\"check\": \"trailing prefix with zero argument\", \"actual\": [[0, 0, \"LOAD_CONST\", 1, null], [\"dangling-extended-arg\", 2]], \"expected\": [[0, 0, \"LOAD_CONST\", 1, null], [\"dangling-extended-arg\", 2]], \"passed\": true}, {\"check\": \"control: unknown opcode and odd trailing byte\", \"actual\": [[0, 0, \"UNKNOWN\", 1, null], [2, 2, \"RETURN_VALUE\", 0, null]], \"expected\": [[0, 0, \"UNKNOWN\", 1, null], [2, 2, \"RETURN_VALUE\", 0, null]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}