{"abstract":"The first instruction of each line is attributed to the line before it; offset 0 wraps to the last line.","category":"Bytecode virtual machines","checks":8,"contract":"Delta-encoded line table: each pair [addr_delta, line_delta] advances the bytecode address by addr_delta two-byte code units and the line by line_delta, a byte to be read as signed (values >= 128 mean value - 256). A decoded delta of -128 marks \"no line\" (None) at that address and does not move the running line. Offset 0 implicitly maps to first. A byte offset q maps to the last entry whose address is <= q (later entries at the same address win). Return the line for each query.","evaluation_group":"w2-bytecode-virtual-machines-line-number-table","failed_approach":"Using the bisect_left index directly maps interior offsets to the following entry.","family":"w2-bytecode-virtual-machines-line-number-table-offset-lookup-side","id":"FA-89996","implementations":{"attempt":{"sha256":"17da66f9a4ba5d888b56f7af31fb6f865a8ae880c31cc938ab151bf42e448f3e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport bisect\nN = 1\nobservations = []\ndef solve(first, pairs, queries):\n    starts, lines = [0], [first]\n    addr, line = 0, first\n    for ad, ld in pairs:\n        addr += ad * 2\n        if ld >= 128:\n            ld -= 256\n        if ld == -128:\n            starts.append(addr)\n            lines.append(None)\n            continue\n        line += ld\n        starts.append(addr)\n        lines.append(line)\n    out = []\n    for q in queries:\n        i = min(bisect.bisect_left(starts, q), len(starts) - 1)\n        out.append(lines[i])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('offset before the first entry maps to first line',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [0, 2]),\n   [101, 101]),\n  ('regression: exact entry offsets',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [4, 10]),\n   [102, 105]),\n  ('interior offsets',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [5, 12]),\n   [102, 105]),\n  ('no-line marker',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [18, 19]),\n   [None, None]),\n  ('line resumes after marker',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [22, 23]),\n   [109, 109]),\n  ('negative line delta',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [24, 30]),\n   [103, 103]),\n  ('zero line delta keeps line',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [34, 36]),\n   [103, 103]),\n  ('control: past the last entry',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [38, 90]),\n   [110, 110])],\n [('offset before the first entry maps to first line',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [0, 2]),\n   [102, 102]),\n  ('regression: exact entry offsets',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [4, 10]),\n   [103, 106]),\n  ('interior offsets',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [5, 12]),\n   [103, 106]),\n  ('no-line marker',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [18, 19]),\n   [None, None]),\n  ('line resumes after marker',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [22, 23]),\n   [111, 111]),\n  ('negative line delta',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [24, 30]),\n   [105, 105]),\n  ('zero line delta keeps line',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [34, 36]),\n   [105, 105]),\n  ('control: past the last entry',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [38, 90]),\n   [112, 112])],\n [('offset before the first entry maps to first line',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [0, 2]),\n   [103, 103]),\n  ('regression: exact entry offsets',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [4, 10]),\n   [104, 107]),\n  ('interior offsets',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [5, 12]),\n   [104, 107]),\n  ('no-line marker',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [18, 19]),\n   [None, None]),\n  ('line resumes after marker',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [22, 23]),\n   [113, 113]),\n  ('negative line delta',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [24, 30]),\n   [107, 107]),\n  ('zero line delta keeps line',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [34, 36]),\n   [107, 107]),\n  ('control: past the last entry',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [38, 90]),\n   [114, 114])],\n [('offset before the first entry maps to first line',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [0, 2]),\n   [104, 104]),\n  ('regression: exact entry offsets',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [4, 10]),\n   [105, 108]),\n  ('interior offsets',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [5, 12]),\n   [105, 108]),\n  ('no-line marker',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [18, 19]),\n   [None, None]),\n  ('line resumes after marker',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [22, 23]),\n   [115, 115]),\n  ('negative line delta',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [24, 30]),\n   [109, 109]),\n  ('zero line delta keeps line',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [34, 36]),\n   [109, 109]),\n  ('control: past the last entry',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [38, 90]),\n   [116, 116])],\n [('offset before the first entry maps to first line',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [0, 2]),\n   [105, 105]),\n  ('regression: exact entry offsets',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [4, 10]),\n   [106, 109]),\n  ('interior offsets',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [5, 12]),\n   [106, 109]),\n  ('no-line marker',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [18, 19]),\n   [None, None]),\n  ('line resumes after marker',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [22, 23]),\n   [117, 117]),\n  ('negative line delta',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [24, 30]),\n   [111, 111]),\n  ('zero line delta keeps line',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [34, 36]),\n   [111, 111]),\n  ('control: past the last entry',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [38, 90]),\n   [118, 118])]]\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":"f447456326670b2a6c92aecc3dbd2f424e20053e9f41a5e454ce1ee378744bc9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport bisect\nN = 1\nobservations = []\ndef solve(first, pairs, queries):\n    starts, lines = [0], [first]\n    addr, line = 0, first\n    for ad, ld in pairs:\n        addr += ad * 2\n        if ld >= 128:\n            ld -= 256\n        if ld == -128:\n            starts.append(addr)\n            lines.append(None)\n            continue\n        line += ld\n        starts.append(addr)\n        lines.append(line)\n    out = []\n    for q in queries:\n        i = bisect.bisect_left(starts, q) - 1\n        out.append(lines[i])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('offset before the first entry maps to first line',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [0, 2]),\n   [101, 101]),\n  ('regression: exact entry offsets',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [4, 10]),\n   [102, 105]),\n  ('interior offsets',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [5, 12]),\n   [102, 105]),\n  ('no-line marker',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [18, 19]),\n   [None, None]),\n  ('line resumes after marker',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [22, 23]),\n   [109, 109]),\n  ('negative line delta',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [24, 30]),\n   [103, 103]),\n  ('zero line delta keeps line',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [34, 36]),\n   [103, 103]),\n  ('control: past the last entry',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [38, 90]),\n   [110, 110])],\n [('offset before the first entry maps to first line',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [0, 2]),\n   [102, 102]),\n  ('regression: exact entry offsets',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [4, 10]),\n   [103, 106]),\n  ('interior offsets',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [5, 12]),\n   [103, 106]),\n  ('no-line marker',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [18, 19]),\n   [None, None]),\n  ('line resumes after marker',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [22, 23]),\n   [111, 111]),\n  ('negative line delta',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [24, 30]),\n   [105, 105]),\n  ('zero line delta keeps line',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [34, 36]),\n   [105, 105]),\n  ('control: past the last entry',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [38, 90]),\n   [112, 112])],\n [('offset before the first entry maps to first line',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [0, 2]),\n   [103, 103]),\n  ('regression: exact entry offsets',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [4, 10]),\n   [104, 107]),\n  ('interior offsets',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [5, 12]),\n   [104, 107]),\n  ('no-line marker',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [18, 19]),\n   [None, None]),\n  ('line resumes after marker',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [22, 23]),\n   [113, 113]),\n  ('negative line delta',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [24, 30]),\n   [107, 107]),\n  ('zero line delta keeps line',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [34, 36]),\n   [107, 107]),\n  ('control: past the last entry',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [38, 90]),\n   [114, 114])],\n [('offset before the first entry maps to first line',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [0, 2]),\n   [104, 104]),\n  ('regression: exact entry offsets',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [4, 10]),\n   [105, 108]),\n  ('interior offsets',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [5, 12]),\n   [105, 108]),\n  ('no-line marker',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [18, 19]),\n   [None, None]),\n  ('line resumes after marker',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [22, 23]),\n   [115, 115]),\n  ('negative line delta',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [24, 30]),\n   [109, 109]),\n  ('zero line delta keeps line',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [34, 36]),\n   [109, 109]),\n  ('control: past the last entry',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [38, 90]),\n   [116, 116])],\n [('offset before the first entry maps to first line',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [0, 2]),\n   [105, 105]),\n  ('regression: exact entry offsets',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [4, 10]),\n   [106, 109]),\n  ('interior offsets',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [5, 12]),\n   [106, 109]),\n  ('no-line marker',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [18, 19]),\n   [None, None]),\n  ('line resumes after marker',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [22, 23]),\n   [117, 117]),\n  ('negative line delta',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [24, 30]),\n   [111, 111]),\n  ('zero line delta keeps line',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [34, 36]),\n   [111, 111]),\n  ('control: past the last entry',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [38, 90]),\n   [118, 118])]]\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":"a22937290d0eabf6bb54d21278f5d5a9b3c813425cad85086e86c124d273d37d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport bisect\nN = 1\nobservations = []\ndef solve(first, pairs, queries):\n    starts, lines = [0], [first]\n    addr, line = 0, first\n    for ad, ld in pairs:\n        addr += ad * 2\n        if ld >= 128:\n            ld -= 256\n        if ld == -128:\n            starts.append(addr)\n            lines.append(None)\n            continue\n        line += ld\n        starts.append(addr)\n        lines.append(line)\n    out = []\n    for q in queries:\n        i = bisect.bisect_right(starts, q) - 1\n        out.append(lines[i])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('offset before the first entry maps to first line',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [0, 2]),\n   [101, 101]),\n  ('regression: exact entry offsets',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [4, 10]),\n   [102, 105]),\n  ('interior offsets',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [5, 12]),\n   [102, 105]),\n  ('no-line marker',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [18, 19]),\n   [None, None]),\n  ('line resumes after marker',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [22, 23]),\n   [109, 109]),\n  ('negative line delta',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [24, 30]),\n   [103, 103]),\n  ('zero line delta keeps line',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [34, 36]),\n   [103, 103]),\n  ('control: past the last entry',\n   (101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [38, 90]),\n   [110, 110])],\n [('offset before the first entry maps to first line',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [0, 2]),\n   [102, 102]),\n  ('regression: exact entry offsets',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [4, 10]),\n   [103, 106]),\n  ('interior offsets',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [5, 12]),\n   [103, 106]),\n  ('no-line marker',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [18, 19]),\n   [None, None]),\n  ('line resumes after marker',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [22, 23]),\n   [111, 111]),\n  ('negative line delta',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [24, 30]),\n   [105, 105]),\n  ('zero line delta keeps line',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [34, 36]),\n   [105, 105]),\n  ('control: past the last entry',\n   (102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [38, 90]),\n   [112, 112])],\n [('offset before the first entry maps to first line',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [0, 2]),\n   [103, 103]),\n  ('regression: exact entry offsets',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [4, 10]),\n   [104, 107]),\n  ('interior offsets',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [5, 12]),\n   [104, 107]),\n  ('no-line marker',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [18, 19]),\n   [None, None]),\n  ('line resumes after marker',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [22, 23]),\n   [113, 113]),\n  ('negative line delta',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [24, 30]),\n   [107, 107]),\n  ('zero line delta keeps line',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [34, 36]),\n   [107, 107]),\n  ('control: past the last entry',\n   (103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [38, 90]),\n   [114, 114])],\n [('offset before the first entry maps to first line',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [0, 2]),\n   [104, 104]),\n  ('regression: exact entry offsets',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [4, 10]),\n   [105, 108]),\n  ('interior offsets',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [5, 12]),\n   [105, 108]),\n  ('no-line marker',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [18, 19]),\n   [None, None]),\n  ('line resumes after marker',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [22, 23]),\n   [115, 115]),\n  ('negative line delta',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [24, 30]),\n   [109, 109]),\n  ('zero line delta keeps line',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [34, 36]),\n   [109, 109]),\n  ('control: past the last entry',\n   (104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [38, 90]),\n   [116, 116])],\n [('offset before the first entry maps to first line',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [0, 2]),\n   [105, 105]),\n  ('regression: exact entry offsets',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [4, 10]),\n   [106, 109]),\n  ('interior offsets',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [5, 12]),\n   [106, 109]),\n  ('no-line marker',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [18, 19]),\n   [None, None]),\n  ('line resumes after marker',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [22, 23]),\n   [117, 117]),\n  ('negative line delta',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [24, 30]),\n   [111, 111]),\n  ('zero line delta keeps line',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [34, 36]),\n   [111, 111]),\n  ('control: past the last entry',\n   (105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [38, 90]),\n   [118, 118])]]\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-line-number-table-offset-lookup-side","generated_at":"2026-09-29T14:51:22.606404+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Tracebacks and debuggers depend on exact decoding of compact line tables.","repair":"Use bisect_right - 1 to take the last entry starting at or before the offset.","root_cause":"bisect_left finds the insertion point before equal starts, so exact matches step back one entry.","sha256":"054dd4d0d8c8c59dd713b5e052d2f61501c38dad18059cc8df6f652610321ad4","title":"Line table: offsets equal to an entry start use the previous line · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.365,"exit_code":1,"observations":[{"actual":[101,102],"check":"offset before the first entry maps to first line","expected":[101,101],"passed":false},{"actual":[102,104],"check":"regression: exact entry offsets","expected":[102,105],"passed":false},{"actual":[104,null],"check":"interior offsets","expected":[102,105],"passed":false},{"actual":[null,109],"check":"no-line marker","expected":[null,null],"passed":false},{"actual":[109,103],"check":"line resumes after marker","expected":[109,109],"passed":false},{"actual":[103,103],"check":"negative line delta","expected":[103,103],"passed":true},{"actual":[103,110],"check":"zero line delta keeps line","expected":[103,103],"passed":false},{"actual":[110,110],"check":"control: past the last entry","expected":[110,110],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"offset before the first entry maps to first line\", \"actual\": [101, 102], \"expected\": [101, 101], \"passed\": false}, {\"check\": \"regression: exact entry offsets\", \"actual\": [102, 104], \"expected\": [102, 105], \"passed\": false}, {\"check\": \"interior offsets\", \"actual\": [104, null], \"expected\": [102, 105], \"passed\": false}, {\"check\": \"no-line marker\", \"actual\": [null, 109], \"expected\": [null, null], \"passed\": false}, {\"check\": \"line resumes after marker\", \"actual\": [109, 103], \"expected\": [109, 109], \"passed\": false}, {\"check\": \"negative line delta\", \"actual\": [103, 103], \"expected\": [103, 103], \"passed\": true}, {\"check\": \"zero line delta keeps line\", \"actual\": [103, 110], \"expected\": [103, 103], \"passed\": false}, {\"check\": \"control: past the last entry\", \"actual\": [110, 110], \"expected\": [110, 110], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.76,"exit_code":1,"observations":[{"actual":[110,101],"check":"offset before the first entry maps to first line","expected":[101,101],"passed":false},{"actual":[101,102],"check":"regression: exact entry offsets","expected":[102,105],"passed":false},{"actual":[102,105],"check":"interior offsets","expected":[102,105],"passed":true},{"actual":[105,null],"check":"no-line marker","expected":[null,null],"passed":false},{"actual":[null,109],"check":"line resumes after marker","expected":[109,109],"passed":false},{"actual":[109,103],"check":"negative line delta","expected":[103,103],"passed":false},{"actual":[103,103],"check":"zero line delta keeps line","expected":[103,103],"passed":true},{"actual":[103,110],"check":"control: past the last entry","expected":[110,110],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"offset before the first entry maps to first line\", \"actual\": [110, 101], \"expected\": [101, 101], \"passed\": false}, {\"check\": \"regression: exact entry offsets\", \"actual\": [101, 102], \"expected\": [102, 105], \"passed\": false}, {\"check\": \"interior offsets\", \"actual\": [102, 105], \"expected\": [102, 105], \"passed\": true}, {\"check\": \"no-line marker\", \"actual\": [105, null], \"expected\": [null, null], \"passed\": false}, {\"check\": \"line resumes after marker\", \"actual\": [null, 109], \"expected\": [109, 109], \"passed\": false}, {\"check\": \"negative line delta\", \"actual\": [109, 103], \"expected\": [103, 103], \"passed\": false}, {\"check\": \"zero line delta keeps line\", \"actual\": [103, 103], \"expected\": [103, 103], \"passed\": true}, {\"check\": \"control: past the last entry\", \"actual\": [103, 110], \"expected\": [110, 110], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.303,"exit_code":0,"observations":[{"actual":[101,101],"check":"offset before the first entry maps to first line","expected":[101,101],"passed":true},{"actual":[102,105],"check":"regression: exact entry offsets","expected":[102,105],"passed":true},{"actual":[102,105],"check":"interior offsets","expected":[102,105],"passed":true},{"actual":[null,null],"check":"no-line marker","expected":[null,null],"passed":true},{"actual":[109,109],"check":"line resumes after marker","expected":[109,109],"passed":true},{"actual":[103,103],"check":"negative line delta","expected":[103,103],"passed":true},{"actual":[103,103],"check":"zero line delta keeps line","expected":[103,103],"passed":true},{"actual":[110,110],"check":"control: past the last entry","expected":[110,110],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"offset before the first entry maps to first line\", \"actual\": [101, 101], \"expected\": [101, 101], \"passed\": true}, {\"check\": \"regression: exact entry offsets\", \"actual\": [102, 105], \"expected\": [102, 105], \"passed\": true}, {\"check\": \"interior offsets\", \"actual\": [102, 105], \"expected\": [102, 105], \"passed\": true}, {\"check\": \"no-line marker\", \"actual\": [null, null], \"expected\": [null, null], \"passed\": true}, {\"check\": \"line resumes after marker\", \"actual\": [109, 109], \"expected\": [109, 109], \"passed\": true}, {\"check\": \"negative line delta\", \"actual\": [103, 103], \"expected\": [103, 103], \"passed\": true}, {\"check\": \"zero line delta keeps line\", \"actual\": [103, 103], \"expected\": [103, 103], \"passed\": true}, {\"check\": \"control: past the last entry\", \"actual\": [110, 110], \"expected\": [110, 110], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}