{"abstract":"catch (IOException) no longer catches FileNotFoundException.","category":"Bytecode virtual machines","checks":10,"contract":"frames are ordered outermost first; the innermost frame carries the faulting pc, every caller carries the return address \"ret\" and the invoke opcode \"via\" (invokeinterface and invokedynamic are 5 bytes, other invokes 3), and the lookup pc is the invoke's own address. Each table entry [start, end, handler, type] covers start <= pc < end; entries are tried in table order; type None catches anything, otherwise the thrown type or any ancestor (parents map) must equal it. Return handler, number of frames unwound and the operand stack at the handler (cleared, then the exception pushed).","evaluation_group":"w2-bytecode-virtual-machines-exception-table-dispatch","failed_approach":"Walking the hierarchy from the catch type upward lets subclass handlers catch superclass exceptions.","family":"w2-bytecode-virtual-machines-exception-table-dispatch-handler-type-test","id":"FA-89966","implementations":{"attempt":{"sha256":"4d6a79052ef13e8d173e56ae307e83ba45fbd810fd60411cc8a74311744aae3d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(frames, exc, parents):\n    def is_sub(t, target):\n        while t is not None:\n            if t == target:\n                return True\n            t = parents.get(t)\n        return False\n    unwound = 0\n    for depth, frame in enumerate(reversed(frames)):\n        if depth == 0:\n            pc = frame['pc']\n        else:\n            pc = frame['ret'] - (5 if frame['via'] in ('invokeinterface', 'invokedynamic') else 3)\n        for start, end, handler, catch in frame['table']:\n            if start <= pc < end and (catch is None or is_sub(catch, exc)):\n                return {'handler': handler, 'unwound': unwound, 'stack': [exc]}\n        unwound += 1\n    return {'handler': None, 'unwound': unwound, 'stack': []}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('range end is exclusive',\n   ([{'pc': 20, 'stack': [1, 2], 'table': [[10, 20, 100, 'IOException'], [20, 30, 200, 'IOException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 200, 'stack': ['IOException'], 'unwound': 0}),\n  ('range start is inclusive',\n   ([{'pc': 10, 'stack': [1, 2], 'table': [[10, 15, 300, 'Exception']]}],\n    'ArithmeticException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 300, 'stack': ['ArithmeticException'], 'unwound': 0}),\n  ('regression: first matching entry in table order wins',\n   ([{'pc': 17, 'stack': [1, 2], 'table': [[10, 30, 100, 'Exception'], [15, 20, 200, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 100, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('subclass instance caught by superclass handler',\n   ([{'pc': 11, 'stack': [1, 2], 'table': [[10, 19, 150, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 150, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('superclass instance not caught by subclass handler',\n   ([{'pc': 11, 'stack': [1, 2], 'table': [[10, 19, 150, 'FileNotFoundException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('any-type entry catches errors',\n   ([{'pc': 12, 'stack': [1, 2], 'table': [[10, 19, 400, None]]}],\n    'StackOverflowError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 400, 'stack': ['StackOverflowError'], 'unwound': 0}),\n  ('Exception handler does not catch Error',\n   ([{'pc': 12, 'stack': [1, 2], 'table': [[10, 19, 410, 'Exception']]}],\n    'AssertionError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('caller frame after 3-byte invoke',\n   ([{'ret': 23, 'stack': [1], 'table': [[20, 23, 500, 'Exception']], 'via': 'invokestatic'},\n     {'pc': 3, 'stack': [1, 2], 'table': []}],\n    'RuntimeException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 500, 'stack': ['RuntimeException'], 'unwound': 1}),\n  ('caller frame after 5-byte invokeinterface',\n   ([{'ret': 25, 'stack': [1], 'table': [[20, 25, 600, None]], 'via': 'invokeinterface'},\n     {'pc': 3, 'stack': [1, 2], 'table': []}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 600, 'stack': ['IOException'], 'unwound': 1}),\n  ('control: uncaught through two frames',\n   ([{'ret': 13, 'stack': [], 'table': [[15, 19, 1, None]], 'via': 'invokevirtual'},\n     {'pc': 4, 'stack': [1, 2], 'table': [[0, 3, 2, None]]}],\n    'Error',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 2})],\n [('range end is exclusive',\n   ([{'pc': 30, 'stack': [2, 2], 'table': [[20, 30, 100, 'IOException'], [30, 40, 200, 'IOException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 200, 'stack': ['IOException'], 'unwound': 0}),\n  ('range start is inclusive',\n   ([{'pc': 20, 'stack': [2, 2], 'table': [[20, 25, 300, 'Exception']]}],\n    'ArithmeticException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 300, 'stack': ['ArithmeticException'], 'unwound': 0}),\n  ('regression: first matching entry in table order wins',\n   ([{'pc': 27, 'stack': [2, 2], 'table': [[20, 40, 100, 'Exception'], [25, 30, 200, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 100, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('subclass instance caught by superclass handler',\n   ([{'pc': 21, 'stack': [2, 2], 'table': [[20, 29, 150, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 150, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('superclass instance not caught by subclass handler',\n   ([{'pc': 21, 'stack': [2, 2], 'table': [[20, 29, 150, 'FileNotFoundException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('any-type entry catches errors',\n   ([{'pc': 22, 'stack': [2, 2], 'table': [[20, 29, 400, None]]}],\n    'StackOverflowError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 400, 'stack': ['StackOverflowError'], 'unwound': 0}),\n  ('Exception handler does not catch Error',\n   ([{'pc': 22, 'stack': [2, 2], 'table': [[20, 29, 410, 'Exception']]}],\n    'AssertionError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('caller frame after 3-byte invoke',\n   ([{'ret': 33, 'stack': [1], 'table': [[30, 33, 500, 'Exception']], 'via': 'invokestatic'},\n     {'pc': 3, 'stack': [2, 2], 'table': []}],\n    'RuntimeException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 500, 'stack': ['RuntimeException'], 'unwound': 1}),\n  ('caller frame after 5-byte invokeinterface',\n   ([{'ret': 35, 'stack': [1], 'table': [[30, 35, 600, None]], 'via': 'invokeinterface'},\n     {'pc': 3, 'stack': [2, 2], 'table': []}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 600, 'stack': ['IOException'], 'unwound': 1}),\n  ('control: uncaught through two frames',\n   ([{'ret': 23, 'stack': [], 'table': [[25, 29, 1, None]], 'via': 'invokevirtual'},\n     {'pc': 4, 'stack': [2, 2], 'table': [[0, 3, 2, None]]}],\n    'Error',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 2})],\n [('range end is exclusive',\n   ([{'pc': 40, 'stack': [3, 2], 'table': [[30, 40, 100, 'IOException'], [40, 50, 200, 'IOException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 200, 'stack': ['IOException'], 'unwound': 0}),\n  ('range start is inclusive',\n   ([{'pc': 30, 'stack': [3, 2], 'table': [[30, 35, 300, 'Exception']]}],\n    'ArithmeticException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 300, 'stack': ['ArithmeticException'], 'unwound': 0}),\n  ('regression: first matching entry in table order wins',\n   ([{'pc': 37, 'stack': [3, 2], 'table': [[30, 50, 100, 'Exception'], [35, 40, 200, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 100, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('subclass instance caught by superclass handler',\n   ([{'pc': 31, 'stack': [3, 2], 'table': [[30, 39, 150, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 150, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('superclass instance not caught by subclass handler',\n   ([{'pc': 31, 'stack': [3, 2], 'table': [[30, 39, 150, 'FileNotFoundException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('any-type entry catches errors',\n   ([{'pc': 32, 'stack': [3, 2], 'table': [[30, 39, 400, None]]}],\n    'StackOverflowError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 400, 'stack': ['StackOverflowError'], 'unwound': 0}),\n  ('Exception handler does not catch Error',\n   ([{'pc': 32, 'stack': [3, 2], 'table': [[30, 39, 410, 'Exception']]}],\n    'AssertionError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('caller frame after 3-byte invoke',\n   ([{'ret': 43, 'stack': [1], 'table': [[40, 43, 500, 'Exception']], 'via': 'invokestatic'},\n     {'pc': 3, 'stack': [3, 2], 'table': []}],\n    'RuntimeException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 500, 'stack': ['RuntimeException'], 'unwound': 1}),\n  ('caller frame after 5-byte invokeinterface',\n   ([{'ret': 45, 'stack': [1], 'table': [[40, 45, 600, None]], 'via': 'invokeinterface'},\n     {'pc': 3, 'stack': [3, 2], 'table': []}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 600, 'stack': ['IOException'], 'unwound': 1}),\n  ('control: uncaught through two frames',\n   ([{'ret': 33, 'stack': [], 'table': [[35, 39, 1, None]], 'via': 'invokevirtual'},\n     {'pc': 4, 'stack': [3, 2], 'table': [[0, 3, 2, None]]}],\n    'Error',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 2})],\n [('range end is exclusive',\n   ([{'pc': 50, 'stack': [4, 2], 'table': [[40, 50, 100, 'IOException'], [50, 60, 200, 'IOException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 200, 'stack': ['IOException'], 'unwound': 0}),\n  ('range start is inclusive',\n   ([{'pc': 40, 'stack': [4, 2], 'table': [[40, 45, 300, 'Exception']]}],\n    'ArithmeticException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 300, 'stack': ['ArithmeticException'], 'unwound': 0}),\n  ('regression: first matching entry in table order wins',\n   ([{'pc': 47, 'stack': [4, 2], 'table': [[40, 60, 100, 'Exception'], [45, 50, 200, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 100, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('subclass instance caught by superclass handler',\n   ([{'pc': 41, 'stack': [4, 2], 'table': [[40, 49, 150, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 150, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('superclass instance not caught by subclass handler',\n   ([{'pc': 41, 'stack': [4, 2], 'table': [[40, 49, 150, 'FileNotFoundException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('any-type entry catches errors',\n   ([{'pc': 42, 'stack': [4, 2], 'table': [[40, 49, 400, None]]}],\n    'StackOverflowError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 400, 'stack': ['StackOverflowError'], 'unwound': 0}),\n  ('Exception handler does not catch Error',\n   ([{'pc': 42, 'stack': [4, 2], 'table': [[40, 49, 410, 'Exception']]}],\n    'AssertionError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('caller frame after 3-byte invoke',\n   ([{'ret': 53, 'stack': [1], 'table': [[50, 53, 500, 'Exception']], 'via': 'invokestatic'},\n     {'pc': 3, 'stack': [4, 2], 'table': []}],\n    'RuntimeException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 500, 'stack': ['RuntimeException'], 'unwound': 1}),\n  ('caller frame after 5-byte invokeinterface',\n   ([{'ret': 55, 'stack': [1], 'table': [[50, 55, 600, None]], 'via': 'invokeinterface'},\n     {'pc': 3, 'stack': [4, 2], 'table': []}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 600, 'stack': ['IOException'], 'unwound': 1}),\n  ('control: uncaught through two frames',\n   ([{'ret': 43, 'stack': [], 'table': [[45, 49, 1, None]], 'via': 'invokevirtual'},\n     {'pc': 4, 'stack': [4, 2], 'table': [[0, 3, 2, None]]}],\n    'Error',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 2})],\n [('range end is exclusive',\n   ([{'pc': 60, 'stack': [5, 2], 'table': [[50, 60, 100, 'IOException'], [60, 70, 200, 'IOException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 200, 'stack': ['IOException'], 'unwound': 0}),\n  ('range start is inclusive',\n   ([{'pc': 50, 'stack': [5, 2], 'table': [[50, 55, 300, 'Exception']]}],\n    'ArithmeticException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 300, 'stack': ['ArithmeticException'], 'unwound': 0}),\n  ('regression: first matching entry in table order wins',\n   ([{'pc': 57, 'stack': [5, 2], 'table': [[50, 70, 100, 'Exception'], [55, 60, 200, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 100, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('subclass instance caught by superclass handler',\n   ([{'pc': 51, 'stack': [5, 2], 'table': [[50, 59, 150, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 150, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('superclass instance not caught by subclass handler',\n   ([{'pc': 51, 'stack': [5, 2], 'table': [[50, 59, 150, 'FileNotFoundException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('any-type entry catches errors',\n   ([{'pc': 52, 'stack': [5, 2], 'table': [[50, 59, 400, None]]}],\n    'StackOverflowError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 400, 'stack': ['StackOverflowError'], 'unwound': 0}),\n  ('Exception handler does not catch Error',\n   ([{'pc': 52, 'stack': [5, 2], 'table': [[50, 59, 410, 'Exception']]}],\n    'AssertionError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('caller frame after 3-byte invoke',\n   ([{'ret': 63, 'stack': [1], 'table': [[60, 63, 500, 'Exception']], 'via': 'invokestatic'},\n     {'pc': 3, 'stack': [5, 2], 'table': []}],\n    'RuntimeException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 500, 'stack': ['RuntimeException'], 'unwound': 1}),\n  ('caller frame after 5-byte invokeinterface',\n   ([{'ret': 65, 'stack': [1], 'table': [[60, 65, 600, None]], 'via': 'invokeinterface'},\n     {'pc': 3, 'stack': [5, 2], 'table': []}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 600, 'stack': ['IOException'], 'unwound': 1}),\n  ('control: uncaught through two frames',\n   ([{'ret': 53, 'stack': [], 'table': [[55, 59, 1, None]], 'via': 'invokevirtual'},\n     {'pc': 4, 'stack': [5, 2], 'table': [[0, 3, 2, None]]}],\n    'Error',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 2})]]\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":"c42a0e228c2570b6ffc2510580198a45c9cd759912cb8a2e47a1f72a99db5b96","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(frames, exc, parents):\n    def is_sub(t, target):\n        while t is not None:\n            if t == target:\n                return True\n            t = parents.get(t)\n        return False\n    unwound = 0\n    for depth, frame in enumerate(reversed(frames)):\n        if depth == 0:\n            pc = frame['pc']\n        else:\n            pc = frame['ret'] - (5 if frame['via'] in ('invokeinterface', 'invokedynamic') else 3)\n        for start, end, handler, catch in frame['table']:\n            if start <= pc < end and (catch is None or exc == catch):\n                return {'handler': handler, 'unwound': unwound, 'stack': [exc]}\n        unwound += 1\n    return {'handler': None, 'unwound': unwound, 'stack': []}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('range end is exclusive',\n   ([{'pc': 20, 'stack': [1, 2], 'table': [[10, 20, 100, 'IOException'], [20, 30, 200, 'IOException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 200, 'stack': ['IOException'], 'unwound': 0}),\n  ('range start is inclusive',\n   ([{'pc': 10, 'stack': [1, 2], 'table': [[10, 15, 300, 'Exception']]}],\n    'ArithmeticException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 300, 'stack': ['ArithmeticException'], 'unwound': 0}),\n  ('regression: first matching entry in table order wins',\n   ([{'pc': 17, 'stack': [1, 2], 'table': [[10, 30, 100, 'Exception'], [15, 20, 200, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 100, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('subclass instance caught by superclass handler',\n   ([{'pc': 11, 'stack': [1, 2], 'table': [[10, 19, 150, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 150, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('superclass instance not caught by subclass handler',\n   ([{'pc': 11, 'stack': [1, 2], 'table': [[10, 19, 150, 'FileNotFoundException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('any-type entry catches errors',\n   ([{'pc': 12, 'stack': [1, 2], 'table': [[10, 19, 400, None]]}],\n    'StackOverflowError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 400, 'stack': ['StackOverflowError'], 'unwound': 0}),\n  ('Exception handler does not catch Error',\n   ([{'pc': 12, 'stack': [1, 2], 'table': [[10, 19, 410, 'Exception']]}],\n    'AssertionError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('caller frame after 3-byte invoke',\n   ([{'ret': 23, 'stack': [1], 'table': [[20, 23, 500, 'Exception']], 'via': 'invokestatic'},\n     {'pc': 3, 'stack': [1, 2], 'table': []}],\n    'RuntimeException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 500, 'stack': ['RuntimeException'], 'unwound': 1}),\n  ('caller frame after 5-byte invokeinterface',\n   ([{'ret': 25, 'stack': [1], 'table': [[20, 25, 600, None]], 'via': 'invokeinterface'},\n     {'pc': 3, 'stack': [1, 2], 'table': []}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 600, 'stack': ['IOException'], 'unwound': 1}),\n  ('control: uncaught through two frames',\n   ([{'ret': 13, 'stack': [], 'table': [[15, 19, 1, None]], 'via': 'invokevirtual'},\n     {'pc': 4, 'stack': [1, 2], 'table': [[0, 3, 2, None]]}],\n    'Error',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 2})],\n [('range end is exclusive',\n   ([{'pc': 30, 'stack': [2, 2], 'table': [[20, 30, 100, 'IOException'], [30, 40, 200, 'IOException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 200, 'stack': ['IOException'], 'unwound': 0}),\n  ('range start is inclusive',\n   ([{'pc': 20, 'stack': [2, 2], 'table': [[20, 25, 300, 'Exception']]}],\n    'ArithmeticException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 300, 'stack': ['ArithmeticException'], 'unwound': 0}),\n  ('regression: first matching entry in table order wins',\n   ([{'pc': 27, 'stack': [2, 2], 'table': [[20, 40, 100, 'Exception'], [25, 30, 200, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 100, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('subclass instance caught by superclass handler',\n   ([{'pc': 21, 'stack': [2, 2], 'table': [[20, 29, 150, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 150, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('superclass instance not caught by subclass handler',\n   ([{'pc': 21, 'stack': [2, 2], 'table': [[20, 29, 150, 'FileNotFoundException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('any-type entry catches errors',\n   ([{'pc': 22, 'stack': [2, 2], 'table': [[20, 29, 400, None]]}],\n    'StackOverflowError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 400, 'stack': ['StackOverflowError'], 'unwound': 0}),\n  ('Exception handler does not catch Error',\n   ([{'pc': 22, 'stack': [2, 2], 'table': [[20, 29, 410, 'Exception']]}],\n    'AssertionError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('caller frame after 3-byte invoke',\n   ([{'ret': 33, 'stack': [1], 'table': [[30, 33, 500, 'Exception']], 'via': 'invokestatic'},\n     {'pc': 3, 'stack': [2, 2], 'table': []}],\n    'RuntimeException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 500, 'stack': ['RuntimeException'], 'unwound': 1}),\n  ('caller frame after 5-byte invokeinterface',\n   ([{'ret': 35, 'stack': [1], 'table': [[30, 35, 600, None]], 'via': 'invokeinterface'},\n     {'pc': 3, 'stack': [2, 2], 'table': []}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 600, 'stack': ['IOException'], 'unwound': 1}),\n  ('control: uncaught through two frames',\n   ([{'ret': 23, 'stack': [], 'table': [[25, 29, 1, None]], 'via': 'invokevirtual'},\n     {'pc': 4, 'stack': [2, 2], 'table': [[0, 3, 2, None]]}],\n    'Error',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 2})],\n [('range end is exclusive',\n   ([{'pc': 40, 'stack': [3, 2], 'table': [[30, 40, 100, 'IOException'], [40, 50, 200, 'IOException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 200, 'stack': ['IOException'], 'unwound': 0}),\n  ('range start is inclusive',\n   ([{'pc': 30, 'stack': [3, 2], 'table': [[30, 35, 300, 'Exception']]}],\n    'ArithmeticException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 300, 'stack': ['ArithmeticException'], 'unwound': 0}),\n  ('regression: first matching entry in table order wins',\n   ([{'pc': 37, 'stack': [3, 2], 'table': [[30, 50, 100, 'Exception'], [35, 40, 200, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 100, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('subclass instance caught by superclass handler',\n   ([{'pc': 31, 'stack': [3, 2], 'table': [[30, 39, 150, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 150, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('superclass instance not caught by subclass handler',\n   ([{'pc': 31, 'stack': [3, 2], 'table': [[30, 39, 150, 'FileNotFoundException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('any-type entry catches errors',\n   ([{'pc': 32, 'stack': [3, 2], 'table': [[30, 39, 400, None]]}],\n    'StackOverflowError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 400, 'stack': ['StackOverflowError'], 'unwound': 0}),\n  ('Exception handler does not catch Error',\n   ([{'pc': 32, 'stack': [3, 2], 'table': [[30, 39, 410, 'Exception']]}],\n    'AssertionError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('caller frame after 3-byte invoke',\n   ([{'ret': 43, 'stack': [1], 'table': [[40, 43, 500, 'Exception']], 'via': 'invokestatic'},\n     {'pc': 3, 'stack': [3, 2], 'table': []}],\n    'RuntimeException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 500, 'stack': ['RuntimeException'], 'unwound': 1}),\n  ('caller frame after 5-byte invokeinterface',\n   ([{'ret': 45, 'stack': [1], 'table': [[40, 45, 600, None]], 'via': 'invokeinterface'},\n     {'pc': 3, 'stack': [3, 2], 'table': []}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 600, 'stack': ['IOException'], 'unwound': 1}),\n  ('control: uncaught through two frames',\n   ([{'ret': 33, 'stack': [], 'table': [[35, 39, 1, None]], 'via': 'invokevirtual'},\n     {'pc': 4, 'stack': [3, 2], 'table': [[0, 3, 2, None]]}],\n    'Error',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 2})],\n [('range end is exclusive',\n   ([{'pc': 50, 'stack': [4, 2], 'table': [[40, 50, 100, 'IOException'], [50, 60, 200, 'IOException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 200, 'stack': ['IOException'], 'unwound': 0}),\n  ('range start is inclusive',\n   ([{'pc': 40, 'stack': [4, 2], 'table': [[40, 45, 300, 'Exception']]}],\n    'ArithmeticException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 300, 'stack': ['ArithmeticException'], 'unwound': 0}),\n  ('regression: first matching entry in table order wins',\n   ([{'pc': 47, 'stack': [4, 2], 'table': [[40, 60, 100, 'Exception'], [45, 50, 200, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 100, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('subclass instance caught by superclass handler',\n   ([{'pc': 41, 'stack': [4, 2], 'table': [[40, 49, 150, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 150, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('superclass instance not caught by subclass handler',\n   ([{'pc': 41, 'stack': [4, 2], 'table': [[40, 49, 150, 'FileNotFoundException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('any-type entry catches errors',\n   ([{'pc': 42, 'stack': [4, 2], 'table': [[40, 49, 400, None]]}],\n    'StackOverflowError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 400, 'stack': ['StackOverflowError'], 'unwound': 0}),\n  ('Exception handler does not catch Error',\n   ([{'pc': 42, 'stack': [4, 2], 'table': [[40, 49, 410, 'Exception']]}],\n    'AssertionError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('caller frame after 3-byte invoke',\n   ([{'ret': 53, 'stack': [1], 'table': [[50, 53, 500, 'Exception']], 'via': 'invokestatic'},\n     {'pc': 3, 'stack': [4, 2], 'table': []}],\n    'RuntimeException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 500, 'stack': ['RuntimeException'], 'unwound': 1}),\n  ('caller frame after 5-byte invokeinterface',\n   ([{'ret': 55, 'stack': [1], 'table': [[50, 55, 600, None]], 'via': 'invokeinterface'},\n     {'pc': 3, 'stack': [4, 2], 'table': []}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 600, 'stack': ['IOException'], 'unwound': 1}),\n  ('control: uncaught through two frames',\n   ([{'ret': 43, 'stack': [], 'table': [[45, 49, 1, None]], 'via': 'invokevirtual'},\n     {'pc': 4, 'stack': [4, 2], 'table': [[0, 3, 2, None]]}],\n    'Error',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 2})],\n [('range end is exclusive',\n   ([{'pc': 60, 'stack': [5, 2], 'table': [[50, 60, 100, 'IOException'], [60, 70, 200, 'IOException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 200, 'stack': ['IOException'], 'unwound': 0}),\n  ('range start is inclusive',\n   ([{'pc': 50, 'stack': [5, 2], 'table': [[50, 55, 300, 'Exception']]}],\n    'ArithmeticException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 300, 'stack': ['ArithmeticException'], 'unwound': 0}),\n  ('regression: first matching entry in table order wins',\n   ([{'pc': 57, 'stack': [5, 2], 'table': [[50, 70, 100, 'Exception'], [55, 60, 200, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 100, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('subclass instance caught by superclass handler',\n   ([{'pc': 51, 'stack': [5, 2], 'table': [[50, 59, 150, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 150, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('superclass instance not caught by subclass handler',\n   ([{'pc': 51, 'stack': [5, 2], 'table': [[50, 59, 150, 'FileNotFoundException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('any-type entry catches errors',\n   ([{'pc': 52, 'stack': [5, 2], 'table': [[50, 59, 400, None]]}],\n    'StackOverflowError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 400, 'stack': ['StackOverflowError'], 'unwound': 0}),\n  ('Exception handler does not catch Error',\n   ([{'pc': 52, 'stack': [5, 2], 'table': [[50, 59, 410, 'Exception']]}],\n    'AssertionError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('caller frame after 3-byte invoke',\n   ([{'ret': 63, 'stack': [1], 'table': [[60, 63, 500, 'Exception']], 'via': 'invokestatic'},\n     {'pc': 3, 'stack': [5, 2], 'table': []}],\n    'RuntimeException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 500, 'stack': ['RuntimeException'], 'unwound': 1}),\n  ('caller frame after 5-byte invokeinterface',\n   ([{'ret': 65, 'stack': [1], 'table': [[60, 65, 600, None]], 'via': 'invokeinterface'},\n     {'pc': 3, 'stack': [5, 2], 'table': []}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 600, 'stack': ['IOException'], 'unwound': 1}),\n  ('control: uncaught through two frames',\n   ([{'ret': 53, 'stack': [], 'table': [[55, 59, 1, None]], 'via': 'invokevirtual'},\n     {'pc': 4, 'stack': [5, 2], 'table': [[0, 3, 2, None]]}],\n    'Error',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 2})]]\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":"0c14b5d32c1af4605ea8187f01afd426afd16aee58098c0b4f381b865e9c7b37","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(frames, exc, parents):\n    def is_sub(t, target):\n        while t is not None:\n            if t == target:\n                return True\n            t = parents.get(t)\n        return False\n    unwound = 0\n    for depth, frame in enumerate(reversed(frames)):\n        if depth == 0:\n            pc = frame['pc']\n        else:\n            pc = frame['ret'] - (5 if frame['via'] in ('invokeinterface', 'invokedynamic') else 3)\n        for start, end, handler, catch in frame['table']:\n            if start <= pc < end and (catch is None or is_sub(exc, catch)):\n                return {'handler': handler, 'unwound': unwound, 'stack': [exc]}\n        unwound += 1\n    return {'handler': None, 'unwound': unwound, 'stack': []}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('range end is exclusive',\n   ([{'pc': 20, 'stack': [1, 2], 'table': [[10, 20, 100, 'IOException'], [20, 30, 200, 'IOException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 200, 'stack': ['IOException'], 'unwound': 0}),\n  ('range start is inclusive',\n   ([{'pc': 10, 'stack': [1, 2], 'table': [[10, 15, 300, 'Exception']]}],\n    'ArithmeticException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 300, 'stack': ['ArithmeticException'], 'unwound': 0}),\n  ('regression: first matching entry in table order wins',\n   ([{'pc': 17, 'stack': [1, 2], 'table': [[10, 30, 100, 'Exception'], [15, 20, 200, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 100, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('subclass instance caught by superclass handler',\n   ([{'pc': 11, 'stack': [1, 2], 'table': [[10, 19, 150, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 150, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('superclass instance not caught by subclass handler',\n   ([{'pc': 11, 'stack': [1, 2], 'table': [[10, 19, 150, 'FileNotFoundException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('any-type entry catches errors',\n   ([{'pc': 12, 'stack': [1, 2], 'table': [[10, 19, 400, None]]}],\n    'StackOverflowError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 400, 'stack': ['StackOverflowError'], 'unwound': 0}),\n  ('Exception handler does not catch Error',\n   ([{'pc': 12, 'stack': [1, 2], 'table': [[10, 19, 410, 'Exception']]}],\n    'AssertionError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('caller frame after 3-byte invoke',\n   ([{'ret': 23, 'stack': [1], 'table': [[20, 23, 500, 'Exception']], 'via': 'invokestatic'},\n     {'pc': 3, 'stack': [1, 2], 'table': []}],\n    'RuntimeException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 500, 'stack': ['RuntimeException'], 'unwound': 1}),\n  ('caller frame after 5-byte invokeinterface',\n   ([{'ret': 25, 'stack': [1], 'table': [[20, 25, 600, None]], 'via': 'invokeinterface'},\n     {'pc': 3, 'stack': [1, 2], 'table': []}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 600, 'stack': ['IOException'], 'unwound': 1}),\n  ('control: uncaught through two frames',\n   ([{'ret': 13, 'stack': [], 'table': [[15, 19, 1, None]], 'via': 'invokevirtual'},\n     {'pc': 4, 'stack': [1, 2], 'table': [[0, 3, 2, None]]}],\n    'Error',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 2})],\n [('range end is exclusive',\n   ([{'pc': 30, 'stack': [2, 2], 'table': [[20, 30, 100, 'IOException'], [30, 40, 200, 'IOException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 200, 'stack': ['IOException'], 'unwound': 0}),\n  ('range start is inclusive',\n   ([{'pc': 20, 'stack': [2, 2], 'table': [[20, 25, 300, 'Exception']]}],\n    'ArithmeticException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 300, 'stack': ['ArithmeticException'], 'unwound': 0}),\n  ('regression: first matching entry in table order wins',\n   ([{'pc': 27, 'stack': [2, 2], 'table': [[20, 40, 100, 'Exception'], [25, 30, 200, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 100, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('subclass instance caught by superclass handler',\n   ([{'pc': 21, 'stack': [2, 2], 'table': [[20, 29, 150, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 150, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('superclass instance not caught by subclass handler',\n   ([{'pc': 21, 'stack': [2, 2], 'table': [[20, 29, 150, 'FileNotFoundException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('any-type entry catches errors',\n   ([{'pc': 22, 'stack': [2, 2], 'table': [[20, 29, 400, None]]}],\n    'StackOverflowError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 400, 'stack': ['StackOverflowError'], 'unwound': 0}),\n  ('Exception handler does not catch Error',\n   ([{'pc': 22, 'stack': [2, 2], 'table': [[20, 29, 410, 'Exception']]}],\n    'AssertionError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('caller frame after 3-byte invoke',\n   ([{'ret': 33, 'stack': [1], 'table': [[30, 33, 500, 'Exception']], 'via': 'invokestatic'},\n     {'pc': 3, 'stack': [2, 2], 'table': []}],\n    'RuntimeException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 500, 'stack': ['RuntimeException'], 'unwound': 1}),\n  ('caller frame after 5-byte invokeinterface',\n   ([{'ret': 35, 'stack': [1], 'table': [[30, 35, 600, None]], 'via': 'invokeinterface'},\n     {'pc': 3, 'stack': [2, 2], 'table': []}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 600, 'stack': ['IOException'], 'unwound': 1}),\n  ('control: uncaught through two frames',\n   ([{'ret': 23, 'stack': [], 'table': [[25, 29, 1, None]], 'via': 'invokevirtual'},\n     {'pc': 4, 'stack': [2, 2], 'table': [[0, 3, 2, None]]}],\n    'Error',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 2})],\n [('range end is exclusive',\n   ([{'pc': 40, 'stack': [3, 2], 'table': [[30, 40, 100, 'IOException'], [40, 50, 200, 'IOException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 200, 'stack': ['IOException'], 'unwound': 0}),\n  ('range start is inclusive',\n   ([{'pc': 30, 'stack': [3, 2], 'table': [[30, 35, 300, 'Exception']]}],\n    'ArithmeticException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 300, 'stack': ['ArithmeticException'], 'unwound': 0}),\n  ('regression: first matching entry in table order wins',\n   ([{'pc': 37, 'stack': [3, 2], 'table': [[30, 50, 100, 'Exception'], [35, 40, 200, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 100, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('subclass instance caught by superclass handler',\n   ([{'pc': 31, 'stack': [3, 2], 'table': [[30, 39, 150, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 150, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('superclass instance not caught by subclass handler',\n   ([{'pc': 31, 'stack': [3, 2], 'table': [[30, 39, 150, 'FileNotFoundException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('any-type entry catches errors',\n   ([{'pc': 32, 'stack': [3, 2], 'table': [[30, 39, 400, None]]}],\n    'StackOverflowError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 400, 'stack': ['StackOverflowError'], 'unwound': 0}),\n  ('Exception handler does not catch Error',\n   ([{'pc': 32, 'stack': [3, 2], 'table': [[30, 39, 410, 'Exception']]}],\n    'AssertionError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('caller frame after 3-byte invoke',\n   ([{'ret': 43, 'stack': [1], 'table': [[40, 43, 500, 'Exception']], 'via': 'invokestatic'},\n     {'pc': 3, 'stack': [3, 2], 'table': []}],\n    'RuntimeException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 500, 'stack': ['RuntimeException'], 'unwound': 1}),\n  ('caller frame after 5-byte invokeinterface',\n   ([{'ret': 45, 'stack': [1], 'table': [[40, 45, 600, None]], 'via': 'invokeinterface'},\n     {'pc': 3, 'stack': [3, 2], 'table': []}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 600, 'stack': ['IOException'], 'unwound': 1}),\n  ('control: uncaught through two frames',\n   ([{'ret': 33, 'stack': [], 'table': [[35, 39, 1, None]], 'via': 'invokevirtual'},\n     {'pc': 4, 'stack': [3, 2], 'table': [[0, 3, 2, None]]}],\n    'Error',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 2})],\n [('range end is exclusive',\n   ([{'pc': 50, 'stack': [4, 2], 'table': [[40, 50, 100, 'IOException'], [50, 60, 200, 'IOException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 200, 'stack': ['IOException'], 'unwound': 0}),\n  ('range start is inclusive',\n   ([{'pc': 40, 'stack': [4, 2], 'table': [[40, 45, 300, 'Exception']]}],\n    'ArithmeticException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 300, 'stack': ['ArithmeticException'], 'unwound': 0}),\n  ('regression: first matching entry in table order wins',\n   ([{'pc': 47, 'stack': [4, 2], 'table': [[40, 60, 100, 'Exception'], [45, 50, 200, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 100, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('subclass instance caught by superclass handler',\n   ([{'pc': 41, 'stack': [4, 2], 'table': [[40, 49, 150, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 150, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('superclass instance not caught by subclass handler',\n   ([{'pc': 41, 'stack': [4, 2], 'table': [[40, 49, 150, 'FileNotFoundException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('any-type entry catches errors',\n   ([{'pc': 42, 'stack': [4, 2], 'table': [[40, 49, 400, None]]}],\n    'StackOverflowError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 400, 'stack': ['StackOverflowError'], 'unwound': 0}),\n  ('Exception handler does not catch Error',\n   ([{'pc': 42, 'stack': [4, 2], 'table': [[40, 49, 410, 'Exception']]}],\n    'AssertionError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('caller frame after 3-byte invoke',\n   ([{'ret': 53, 'stack': [1], 'table': [[50, 53, 500, 'Exception']], 'via': 'invokestatic'},\n     {'pc': 3, 'stack': [4, 2], 'table': []}],\n    'RuntimeException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 500, 'stack': ['RuntimeException'], 'unwound': 1}),\n  ('caller frame after 5-byte invokeinterface',\n   ([{'ret': 55, 'stack': [1], 'table': [[50, 55, 600, None]], 'via': 'invokeinterface'},\n     {'pc': 3, 'stack': [4, 2], 'table': []}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 600, 'stack': ['IOException'], 'unwound': 1}),\n  ('control: uncaught through two frames',\n   ([{'ret': 43, 'stack': [], 'table': [[45, 49, 1, None]], 'via': 'invokevirtual'},\n     {'pc': 4, 'stack': [4, 2], 'table': [[0, 3, 2, None]]}],\n    'Error',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 2})],\n [('range end is exclusive',\n   ([{'pc': 60, 'stack': [5, 2], 'table': [[50, 60, 100, 'IOException'], [60, 70, 200, 'IOException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 200, 'stack': ['IOException'], 'unwound': 0}),\n  ('range start is inclusive',\n   ([{'pc': 50, 'stack': [5, 2], 'table': [[50, 55, 300, 'Exception']]}],\n    'ArithmeticException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 300, 'stack': ['ArithmeticException'], 'unwound': 0}),\n  ('regression: first matching entry in table order wins',\n   ([{'pc': 57, 'stack': [5, 2], 'table': [[50, 70, 100, 'Exception'], [55, 60, 200, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 100, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('subclass instance caught by superclass handler',\n   ([{'pc': 51, 'stack': [5, 2], 'table': [[50, 59, 150, 'IOException']]}],\n    'FileNotFoundException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 150, 'stack': ['FileNotFoundException'], 'unwound': 0}),\n  ('superclass instance not caught by subclass handler',\n   ([{'pc': 51, 'stack': [5, 2], 'table': [[50, 59, 150, 'FileNotFoundException']]}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('any-type entry catches errors',\n   ([{'pc': 52, 'stack': [5, 2], 'table': [[50, 59, 400, None]]}],\n    'StackOverflowError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 400, 'stack': ['StackOverflowError'], 'unwound': 0}),\n  ('Exception handler does not catch Error',\n   ([{'pc': 52, 'stack': [5, 2], 'table': [[50, 59, 410, 'Exception']]}],\n    'AssertionError',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 1}),\n  ('caller frame after 3-byte invoke',\n   ([{'ret': 63, 'stack': [1], 'table': [[60, 63, 500, 'Exception']], 'via': 'invokestatic'},\n     {'pc': 3, 'stack': [5, 2], 'table': []}],\n    'RuntimeException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 500, 'stack': ['RuntimeException'], 'unwound': 1}),\n  ('caller frame after 5-byte invokeinterface',\n   ([{'ret': 65, 'stack': [1], 'table': [[60, 65, 600, None]], 'via': 'invokeinterface'},\n     {'pc': 3, 'stack': [5, 2], 'table': []}],\n    'IOException',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': 600, 'stack': ['IOException'], 'unwound': 1}),\n  ('control: uncaught through two frames',\n   ([{'ret': 53, 'stack': [], 'table': [[55, 59, 1, None]], 'via': 'invokevirtual'},\n     {'pc': 4, 'stack': [5, 2], 'table': [[0, 3, 2, None]]}],\n    'Error',\n    {'ArithmeticException': 'RuntimeException',\n     'AssertionError': 'Error',\n     'Error': 'Throwable',\n     'Exception': 'Throwable',\n     'FileNotFoundException': 'IOException',\n     'IOException': 'Exception',\n     'RuntimeException': 'Exception',\n     'StackOverflowError': 'VirtualMachineError',\n     'VirtualMachineError': 'Error'}),\n   {'handler': None, 'stack': [], 'unwound': 2})]]\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-exception-table-dispatch-handler-type-test","generated_at":"2026-09-29T14:51:22.424950+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Exception dispatch correctness depends on half-open ranges, table order, type hierarchy and pc attribution.","repair":"Accept the handler when the thrown type or one of its ancestors equals the catch type.","root_cause":"The type test compares names for equality rather than walking the superclass chain.","sha256":"435ce807bc2b8175708e342cb6f586fcad3182149df6e58ce318b8e913a809f1","title":"Exception tables: handler requires the exact thrown type · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.46,"exit_code":1,"observations":[{"actual":{"handler":200,"stack":["IOException"],"unwound":0},"check":"range end is exclusive","expected":{"handler":200,"stack":["IOException"],"unwound":0},"passed":true},{"actual":{"handler":null,"stack":[],"unwound":1},"check":"range start is inclusive","expected":{"handler":300,"stack":["ArithmeticException"],"unwound":0},"passed":false},{"actual":{"handler":null,"stack":[],"unwound":1},"check":"regression: first matching entry in table order wins","expected":{"handler":100,"stack":["FileNotFoundException"],"unwound":0},"passed":false},{"actual":{"handler":null,"stack":[],"unwound":1},"check":"subclass instance caught by superclass handler","expected":{"handler":150,"stack":["FileNotFoundException"],"unwound":0},"passed":false},{"actual":{"handler":150,"stack":["IOException"],"unwound":0},"check":"superclass instance not caught by subclass handler","expected":{"handler":null,"stack":[],"unwound":1},"passed":false},{"actual":{"handler":400,"stack":["StackOverflowError"],"unwound":0},"check":"any-type entry catches errors","expected":{"handler":400,"stack":["StackOverflowError"],"unwound":0},"passed":true},{"actual":{"handler":null,"stack":[],"unwound":1},"check":"Exception handler does not catch Error","expected":{"handler":null,"stack":[],"unwound":1},"passed":true},{"actual":{"handler":null,"stack":[],"unwound":2},"check":"caller frame after 3-byte invoke","expected":{"handler":500,"stack":["RuntimeException"],"unwound":1},"passed":false},{"actual":{"handler":600,"stack":["IOException"],"unwound":1},"check":"caller frame after 5-byte invokeinterface","expected":{"handler":600,"stack":["IOException"],"unwound":1},"passed":true},{"actual":{"handler":null,"stack":[],"unwound":2},"check":"control: uncaught through two frames","expected":{"handler":null,"stack":[],"unwound":2},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"range end is exclusive\", \"actual\": {\"handler\": 200, \"unwound\": 0, \"stack\": [\"IOException\"]}, \"expected\": {\"handler\": 200, \"stack\": [\"IOException\"], \"unwound\": 0}, \"passed\": true}, {\"check\": \"range start is inclusive\", \"actual\": {\"handler\": null, \"unwound\": 1, \"stack\": []}, \"expected\": {\"handler\": 300, \"stack\": [\"ArithmeticException\"], \"unwound\": 0}, \"passed\": false}, {\"check\": \"regression: first matching entry in table order wins\", \"actual\": {\"handler\": null, \"unwound\": 1, \"stack\": []}, \"expected\": {\"handler\": 100, \"stack\": [\"FileNotFoundException\"], \"unwound\": 0}, \"passed\": false}, {\"check\": \"subclass instance caught by superclass handler\", \"actual\": {\"handler\": null, \"unwound\": 1, \"stack\": []}, \"expected\": {\"handler\": 150, \"stack\": [\"FileNotFoundException\"], \"unwound\": 0}, \"passed\": false}, {\"check\": \"superclass instance not caught by subclass handler\", \"actual\": {\"handler\": 150, \"unwound\": 0, \"stack\": [\"IOException\"]}, \"expected\": {\"handler\": null, \"stack\": [], \"unwound\": 1}, \"passed\": false}, {\"check\": \"any-type entry catches errors\", \"actual\": {\"handler\": 400, \"unwound\": 0, \"stack\": [\"StackOverflowError\"]}, \"expected\": {\"handler\": 400, \"stack\": [\"StackOverflowError\"], \"unwound\": 0}, \"passed\": true}, {\"check\": \"Exception handler does not catch Error\", \"actual\": {\"handler\": null, \"unwound\": 1, \"stack\": []}, \"expected\": {\"handler\": null, \"stack\": [], \"unwound\": 1}, \"passed\": true}, {\"check\": \"caller frame after 3-byte invoke\", \"actual\": {\"handler\": null, \"unwound\": 2, \"stack\": []}, \"expected\": {\"handler\": 500, \"stack\": [\"RuntimeException\"], \"unwound\": 1}, \"passed\": false}, {\"check\": \"caller frame after 5-byte invokeinterface\", \"actual\": {\"handler\": 600, \"unwound\": 1, \"stack\": [\"IOException\"]}, \"expected\": {\"handler\": 600, \"stack\": [\"IOException\"], \"unwound\": 1}, \"passed\": true}, {\"check\": \"control: uncaught through two frames\", \"actual\": {\"handler\": null, \"unwound\": 2, \"stack\": []}, \"expected\": {\"handler\": null, \"stack\": [], \"unwound\": 2}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.954,"exit_code":1,"observations":[{"actual":{"handler":200,"stack":["IOException"],"unwound":0},"check":"range end is exclusive","expected":{"handler":200,"stack":["IOException"],"unwound":0},"passed":true},{"actual":{"handler":null,"stack":[],"unwound":1},"check":"range start is inclusive","expected":{"handler":300,"stack":["ArithmeticException"],"unwound":0},"passed":false},{"actual":{"handler":null,"stack":[],"unwound":1},"check":"regression: first matching entry in table order wins","expected":{"handler":100,"stack":["FileNotFoundException"],"unwound":0},"passed":false},{"actual":{"handler":null,"stack":[],"unwound":1},"check":"subclass instance caught by superclass handler","expected":{"handler":150,"stack":["FileNotFoundException"],"unwound":0},"passed":false},{"actual":{"handler":null,"stack":[],"unwound":1},"check":"superclass instance not caught by subclass handler","expected":{"handler":null,"stack":[],"unwound":1},"passed":true},{"actual":{"handler":400,"stack":["StackOverflowError"],"unwound":0},"check":"any-type entry catches errors","expected":{"handler":400,"stack":["StackOverflowError"],"unwound":0},"passed":true},{"actual":{"handler":null,"stack":[],"unwound":1},"check":"Exception handler does not catch Error","expected":{"handler":null,"stack":[],"unwound":1},"passed":true},{"actual":{"handler":null,"stack":[],"unwound":2},"check":"caller frame after 3-byte invoke","expected":{"handler":500,"stack":["RuntimeException"],"unwound":1},"passed":false},{"actual":{"handler":600,"stack":["IOException"],"unwound":1},"check":"caller frame after 5-byte invokeinterface","expected":{"handler":600,"stack":["IOException"],"unwound":1},"passed":true},{"actual":{"handler":null,"stack":[],"unwound":2},"check":"control: uncaught through two frames","expected":{"handler":null,"stack":[],"unwound":2},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"range end is exclusive\", \"actual\": {\"handler\": 200, \"unwound\": 0, \"stack\": [\"IOException\"]}, \"expected\": {\"handler\": 200, \"stack\": [\"IOException\"], \"unwound\": 0}, \"passed\": true}, {\"check\": \"range start is inclusive\", \"actual\": {\"handler\": null, \"unwound\": 1, \"stack\": []}, \"expected\": {\"handler\": 300, \"stack\": [\"ArithmeticException\"], \"unwound\": 0}, \"passed\": false}, {\"check\": \"regression: first matching entry in table order wins\", \"actual\": {\"handler\": null, \"unwound\": 1, \"stack\": []}, \"expected\": {\"handler\": 100, \"stack\": [\"FileNotFoundException\"], \"unwound\": 0}, \"passed\": false}, {\"check\": \"subclass instance caught by superclass handler\", \"actual\": {\"handler\": null, \"unwound\": 1, \"stack\": []}, \"expected\": {\"handler\": 150, \"stack\": [\"FileNotFoundException\"], \"unwound\": 0}, \"passed\": false}, {\"check\": \"superclass instance not caught by subclass handler\", \"actual\": {\"handler\": null, \"unwound\": 1, \"stack\": []}, \"expected\": {\"handler\": null, \"stack\": [], \"unwound\": 1}, \"passed\": true}, {\"check\": \"any-type entry catches errors\", \"actual\": {\"handler\": 400, \"unwound\": 0, \"stack\": [\"StackOverflowError\"]}, \"expected\": {\"handler\": 400, \"stack\": [\"StackOverflowError\"], \"unwound\": 0}, \"passed\": true}, {\"check\": \"Exception handler does not catch Error\", \"actual\": {\"handler\": null, \"unwound\": 1, \"stack\": []}, \"expected\": {\"handler\": null, \"stack\": [], \"unwound\": 1}, \"passed\": true}, {\"check\": \"caller frame after 3-byte invoke\", \"actual\": {\"handler\": null, \"unwound\": 2, \"stack\": []}, \"expected\": {\"handler\": 500, \"stack\": [\"RuntimeException\"], \"unwound\": 1}, \"passed\": false}, {\"check\": \"caller frame after 5-byte invokeinterface\", \"actual\": {\"handler\": 600, \"unwound\": 1, \"stack\": [\"IOException\"]}, \"expected\": {\"handler\": 600, \"stack\": [\"IOException\"], \"unwound\": 1}, \"passed\": true}, {\"check\": \"control: uncaught through two frames\", \"actual\": {\"handler\": null, \"unwound\": 2, \"stack\": []}, \"expected\": {\"handler\": null, \"stack\": [], \"unwound\": 2}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.169,"exit_code":0,"observations":[{"actual":{"handler":200,"stack":["IOException"],"unwound":0},"check":"range end is exclusive","expected":{"handler":200,"stack":["IOException"],"unwound":0},"passed":true},{"actual":{"handler":300,"stack":["ArithmeticException"],"unwound":0},"check":"range start is inclusive","expected":{"handler":300,"stack":["ArithmeticException"],"unwound":0},"passed":true},{"actual":{"handler":100,"stack":["FileNotFoundException"],"unwound":0},"check":"regression: first matching entry in table order wins","expected":{"handler":100,"stack":["FileNotFoundException"],"unwound":0},"passed":true},{"actual":{"handler":150,"stack":["FileNotFoundException"],"unwound":0},"check":"subclass instance caught by superclass handler","expected":{"handler":150,"stack":["FileNotFoundException"],"unwound":0},"passed":true},{"actual":{"handler":null,"stack":[],"unwound":1},"check":"superclass instance not caught by subclass handler","expected":{"handler":null,"stack":[],"unwound":1},"passed":true},{"actual":{"handler":400,"stack":["StackOverflowError"],"unwound":0},"check":"any-type entry catches errors","expected":{"handler":400,"stack":["StackOverflowError"],"unwound":0},"passed":true},{"actual":{"handler":null,"stack":[],"unwound":1},"check":"Exception handler does not catch Error","expected":{"handler":null,"stack":[],"unwound":1},"passed":true},{"actual":{"handler":500,"stack":["RuntimeException"],"unwound":1},"check":"caller frame after 3-byte invoke","expected":{"handler":500,"stack":["RuntimeException"],"unwound":1},"passed":true},{"actual":{"handler":600,"stack":["IOException"],"unwound":1},"check":"caller frame after 5-byte invokeinterface","expected":{"handler":600,"stack":["IOException"],"unwound":1},"passed":true},{"actual":{"handler":null,"stack":[],"unwound":2},"check":"control: uncaught through two frames","expected":{"handler":null,"stack":[],"unwound":2},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"range end is exclusive\", \"actual\": {\"handler\": 200, \"unwound\": 0, \"stack\": [\"IOException\"]}, \"expected\": {\"handler\": 200, \"stack\": [\"IOException\"], \"unwound\": 0}, \"passed\": true}, {\"check\": \"range start is inclusive\", \"actual\": {\"handler\": 300, \"unwound\": 0, \"stack\": [\"ArithmeticException\"]}, \"expected\": {\"handler\": 300, \"stack\": [\"ArithmeticException\"], \"unwound\": 0}, \"passed\": true}, {\"check\": \"regression: first matching entry in table order wins\", \"actual\": {\"handler\": 100, \"unwound\": 0, \"stack\": [\"FileNotFoundException\"]}, \"expected\": {\"handler\": 100, \"stack\": [\"FileNotFoundException\"], \"unwound\": 0}, \"passed\": true}, {\"check\": \"subclass instance caught by superclass handler\", \"actual\": {\"handler\": 150, \"unwound\": 0, \"stack\": [\"FileNotFoundException\"]}, \"expected\": {\"handler\": 150, \"stack\": [\"FileNotFoundException\"], \"unwound\": 0}, \"passed\": true}, {\"check\": \"superclass instance not caught by subclass handler\", \"actual\": {\"handler\": null, \"unwound\": 1, \"stack\": []}, \"expected\": {\"handler\": null, \"stack\": [], \"unwound\": 1}, \"passed\": true}, {\"check\": \"any-type entry catches errors\", \"actual\": {\"handler\": 400, \"unwound\": 0, \"stack\": [\"StackOverflowError\"]}, \"expected\": {\"handler\": 400, \"stack\": [\"StackOverflowError\"], \"unwound\": 0}, \"passed\": true}, {\"check\": \"Exception handler does not catch Error\", \"actual\": {\"handler\": null, \"unwound\": 1, \"stack\": []}, \"expected\": {\"handler\": null, \"stack\": [], \"unwound\": 1}, \"passed\": true}, {\"check\": \"caller frame after 3-byte invoke\", \"actual\": {\"handler\": 500, \"unwound\": 1, \"stack\": [\"RuntimeException\"]}, \"expected\": {\"handler\": 500, \"stack\": [\"RuntimeException\"], \"unwound\": 1}, \"passed\": true}, {\"check\": \"caller frame after 5-byte invokeinterface\", \"actual\": {\"handler\": 600, \"unwound\": 1, \"stack\": [\"IOException\"]}, \"expected\": {\"handler\": 600, \"stack\": [\"IOException\"], \"unwound\": 1}, \"passed\": true}, {\"check\": \"control: uncaught through two frames\", \"actual\": {\"handler\": null, \"unwound\": 2, \"stack\": []}, \"expected\": {\"handler\": null, \"stack\": [], \"unwound\": 2}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}