{"abstract":"A postfix parser reverses noncommutative operands.","category":"Parsing","checks":4,"contract":"Parse a valid postfix token list with binary plus/minus into [operator,left,right] ASTs; letters are leaves.","evaluation_group":"model-9c59004095cc7339","failed_approach":"The attempted repair handles the primary example but still violates a separate boundary of the same contract.","family":"xp-postfix-operand-order","id":"FA-4046","implementations":{"attempt":{"sha256":"b2c08386c20855588c5ff2fe4eaddba00e088cb04cb8ecab984cc20d3ff86ff4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct\nfrom urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit\nfrom email.header import decode_header, make_header\nfrom email.utils import getaddresses\nfrom xml.etree import ElementTree as ET\nimport shlex, string, textwrap\n\nN = 1\nobservations = []\ndef solve(x):\n    try:\n        stack=[]\n        for t in x:\n            if t in ('+','-'):\n                right=stack.pop(); left=stack.pop(); stack.append(['+',left,right])\n            else: stack.append(t)\n        return stack[0]\n    except Exception as exc:\n        return {\"error\": type(exc).__name__}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('boundary 1', solve(['a', 'b', '-']), ['-', 'a', 'b'])\ncheck('boundary 2', solve(['a', 'b', 'c', '-', '+']), ['+', 'a', ['-', 'b', 'c']])\ncheck('boundary 3', solve(['x']), 'x')\ncheck('boundary 4', solve(['a', 'b', '+']), ['+', 'a', 'b'])\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":"b67ed1fec0a5126645698da3c9d8027869426200ebe2ae48f59d0c3167bc71db","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct\nfrom urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit\nfrom email.header import decode_header, make_header\nfrom email.utils import getaddresses\nfrom xml.etree import ElementTree as ET\nimport shlex, string, textwrap\n\nN = 1\nobservations = []\ndef solve(x):\n    try:\n        stack=[]\n        for t in x:\n            if t in ('+','-'):\n                left=stack.pop(); right=stack.pop(); stack.append([t,left,right])\n            else: stack.append(t)\n        return stack[0]\n    except Exception as exc:\n        return {\"error\": type(exc).__name__}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('boundary 1', solve(['a', 'b', '-']), ['-', 'a', 'b'])\ncheck('boundary 2', solve(['a', 'b', 'c', '-', '+']), ['+', 'a', ['-', 'b', 'c']])\ncheck('boundary 3', solve(['x']), 'x')\ncheck('boundary 4', solve(['a', 'b', '+']), ['+', 'a', 'b'])\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":"aab328d79df11d4c37e86304239afa9aecd1d09cc52609f871ab59dc21758fd1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct\nfrom urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit\nfrom email.header import decode_header, make_header\nfrom email.utils import getaddresses\nfrom xml.etree import ElementTree as ET\nimport shlex, string, textwrap\n\nN = 1\nobservations = []\ndef solve(x):\n    try:\n        stack=[]\n        for t in x:\n            if t in ('+','-'):\n                right=stack.pop(); left=stack.pop(); stack.append([t,left,right])\n            else: stack.append(t)\n        return stack[0]\n    except Exception as exc:\n        return {\"error\": type(exc).__name__}\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('boundary 1', solve(['a', 'b', '-']), ['-', 'a', 'b'])\ncheck('boundary 2', solve(['a', 'b', 'c', '-', '+']), ['+', 'a', ['-', 'b', 'c']])\ncheck('boundary 3', solve(['x']), 'x')\ncheck('boundary 4', solve(['a', 'b', '+']), ['+', 'a', 'b'])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":" This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"xp-postfix-operand-order","generated_at":"2026-09-29T14:37:34.772608+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A local executable model for consumers of structured text; oracle values are authored literals, not outputs copied from the repaired implementation.","repair":"Implement the complete stated contract, including the boundary fixtures: Parse a valid postfix token list with binary plus/minus into [operator,left,right] ASTs; letters are leaves.","root_cause":"The implementation applies an operation whose text or grammar semantics violate this contract: Parse a valid postfix token list with binary plus/minus into [operator,left,right] ASTs; letters are leaves.","sha256":"d670adcec43fc0b0919fc1ebca46a496d6a2f144861a4b0eed8e6d4373604b61","title":"A postfix parser reverses noncommutative operands · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":59.692,"exit_code":1,"observations":[{"actual":["+","a","b"],"check":"boundary 1","expected":["-","a","b"],"passed":false},{"actual":["+","a",["+","b","c"]],"check":"boundary 2","expected":["+","a",["-","b","c"]],"passed":false},{"actual":"x","check":"boundary 3","expected":"x","passed":true},{"actual":["+","a","b"],"check":"boundary 4","expected":["+","a","b"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": [\"+\", \"a\", \"b\"], \"expected\": [\"-\", \"a\", \"b\"], \"passed\": false}, {\"check\": \"boundary 2\", \"actual\": [\"+\", \"a\", [\"+\", \"b\", \"c\"]], \"expected\": [\"+\", \"a\", [\"-\", \"b\", \"c\"]], \"passed\": false}, {\"check\": \"boundary 3\", \"actual\": \"x\", \"expected\": \"x\", \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": [\"+\", \"a\", \"b\"], \"expected\": [\"+\", \"a\", \"b\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":65.059,"exit_code":1,"observations":[{"actual":["-","b","a"],"check":"boundary 1","expected":["-","a","b"],"passed":false},{"actual":["+",["-","c","b"],"a"],"check":"boundary 2","expected":["+","a",["-","b","c"]],"passed":false},{"actual":"x","check":"boundary 3","expected":"x","passed":true},{"actual":["+","b","a"],"check":"boundary 4","expected":["+","a","b"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": [\"-\", \"b\", \"a\"], \"expected\": [\"-\", \"a\", \"b\"], \"passed\": false}, {\"check\": \"boundary 2\", \"actual\": [\"+\", [\"-\", \"c\", \"b\"], \"a\"], \"expected\": [\"+\", \"a\", [\"-\", \"b\", \"c\"]], \"passed\": false}, {\"check\": \"boundary 3\", \"actual\": \"x\", \"expected\": \"x\", \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": [\"+\", \"b\", \"a\"], \"expected\": [\"+\", \"a\", \"b\"], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":153.261,"exit_code":0,"observations":[{"actual":["-","a","b"],"check":"boundary 1","expected":["-","a","b"],"passed":true},{"actual":["+","a",["-","b","c"]],"check":"boundary 2","expected":["+","a",["-","b","c"]],"passed":true},{"actual":"x","check":"boundary 3","expected":"x","passed":true},{"actual":["+","a","b"],"check":"boundary 4","expected":["+","a","b"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary 1\", \"actual\": [\"-\", \"a\", \"b\"], \"expected\": [\"-\", \"a\", \"b\"], \"passed\": true}, {\"check\": \"boundary 2\", \"actual\": [\"+\", \"a\", [\"-\", \"b\", \"c\"]], \"expected\": [\"+\", \"a\", [\"-\", \"b\", \"c\"]], \"passed\": true}, {\"check\": \"boundary 3\", \"actual\": \"x\", \"expected\": \"x\", \"passed\": true}, {\"check\": \"boundary 4\", \"actual\": [\"+\", \"a\", \"b\"], \"expected\": [\"+\", \"a\", \"b\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}