{"abstract":"Two points are reported as touching.","category":"GIS polygon topology","checks":8,"contract":"Input [matrix, predicate, dimA, dimB] with a 9-character intersection matrix over \"F012\" (row-major II, IB, IE, BI, BB, BE, EI, EB, EE). Pattern characters: \"*\" anything, \"T\" any non-F value, \"F\" only F, \"0\"/\"1\"/\"2\" that exact dimension. disjoint = FF*FF****; intersects = not disjoint; touches (not both points) = FT******* or F**T***** or F***T****; within = T*F**F***; contains = T*****FF*; covers = any of T*****FF*, *T****FF*, ***T**FF*, ****T*FF*; overlaps needs equal dimensions and 1*T***T** for lines else T*T***T**; crosses = T*T****** if dimA < dimB, T*****T** if dimA > dimB, 0******** for two lines, otherwise false; equals = T*F**FFF*. Unknown predicates return None.","evaluation_group":"w2-gis-polygon-topology-de9im-named-predicates","failed_approach":"Rejecting every input with a point first operand also drops valid point/line touches.","family":"w2-gis-polygon-topology-de9im-named-predicates-touches-point-pair-exclusion","id":"FA-70421","implementations":{"attempt":{"sha256":"82e3f9c6efbde051672351488ff2cbd1841e0106edd5a1757d3cd4f219d6690b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    matrix, pred, da, db = x\n    def match(pattern):\n        for m, p in zip(matrix, pattern):\n            if p == '*':\n                continue\n            if p == 'T' and m == 'F':\n                return False\n            if p == 'F' and m != 'F':\n                return False\n            if p in '012' and m != p:\n                return False\n        return True\n    if pred == 'disjoint':\n        return match('FF*FF****')\n    if pred == 'intersects':\n        return not match('FF*FF****')\n    if pred == 'touches':\n        return da != 0 and (match('FT*******') or match('F**T*****') or match('F***T****'))\n    if pred == 'within':\n        return match('T*F**F***')\n    if pred == 'contains':\n        return match('T*****FF*')\n    if pred == 'covers':\n        return any(match(p) for p in ('T*****FF*', '*T****FF*', '***T**FF*', '****T*FF*'))\n    if pred == 'overlaps':\n        if da != db:\n            return False\n        return match('1*T***T**') if da == 1 else match('T*T***T**')\n    if pred == 'crosses':\n        if da < db:\n            return match('T*T******')\n        if da > db:\n            return match('T*****T**')\n        return da == 1 and match('0********')\n    if pred == 'equals':\n        return match('T*F**FFF*')\n    return None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control #0', ['FF2F11212', 'crosses', 2, 2], False), ('control #1', ['FF2F11212', 'intersects', 2, 2], True), ('control #2', ['FF2F11212', 'within', 2, 2], False), ('control #3', ['FF2F11212', 'touches', 2, 2], True), ('control #4', ['212101212', 'overlaps', 2, 2], True), ('control #5', ['212101212', 'crosses', 2, 2], False), ('regression #93', ['F0FFFF102', 'touches', 0, 1], True), ('regression #121', ['F0FFFFFF2', 'touches', 0, 0], False)], [('control #3', ['FF2F11212', 'touches', 2, 2], True), ('control #4', ['212101212', 'overlaps', 2, 2], True), ('control #5', ['212101212', 'crosses', 2, 2], False), ('control #6', ['212101212', 'touches', 2, 2], False), ('control #7', ['212101212', 'intersects', 2, 2], True), ('control #8', ['2FF1FF212', 'contains', 2, 2], False), ('regression #93', ['F0FFFF102', 'touches', 0, 1], True), ('regression #121', ['F0FFFFFF2', 'touches', 0, 0], False)], [('control #6', ['212101212', 'touches', 2, 2], False), ('control #7', ['212101212', 'intersects', 2, 2], True), ('control #8', ['2FF1FF212', 'contains', 2, 2], False), ('control #9', ['2FF1FF212', 'crosses', 2, 2], False), ('control #10', ['2FF1FF212', 'intersects', 2, 2], True), ('control #11', ['2FF1FF212', 'disjoint', 2, 2], False), ('regression #93', ['F0FFFF102', 'touches', 0, 1], True), ('regression #121', ['F0FFFFFF2', 'touches', 0, 0], False)], [('control #9', ['2FF1FF212', 'crosses', 2, 2], False), ('control #10', ['2FF1FF212', 'intersects', 2, 2], True), ('control #11', ['2FF1FF212', 'disjoint', 2, 2], False), ('control #12', ['212FF1FF2', 'intersects', 2, 2], True), ('control #13', ['212FF1FF2', 'contains', 2, 2], True), ('control #14', ['212FF1FF2', 'covers', 2, 2], True), ('regression #93', ['F0FFFF102', 'touches', 0, 1], True), ('regression #121', ['F0FFFFFF2', 'touches', 0, 0], False)], [('control #12', ['212FF1FF2', 'intersects', 2, 2], True), ('control #13', ['212FF1FF2', 'contains', 2, 2], True), ('control #14', ['212FF1FF2', 'covers', 2, 2], True), ('control #15', ['212FF1FF2', 'disjoint', 2, 2], False), ('control #16', ['2FF1FF2F2', 'equals', 2, 2], False), ('control #17', ['2FF1FF2F2', 'disjoint', 2, 2], False), ('regression #93', ['F0FFFF102', 'touches', 0, 1], True), ('regression #121', ['F0FFFFFF2', 'touches', 0, 0], False)]]\nfor label, args, expected in fixtures[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":"3e3894b2853b005fa3dc4ad8f03813c4b5506cba3ea299f7f525e3b0030a1979","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    matrix, pred, da, db = x\n    def match(pattern):\n        for m, p in zip(matrix, pattern):\n            if p == '*':\n                continue\n            if p == 'T' and m == 'F':\n                return False\n            if p == 'F' and m != 'F':\n                return False\n            if p in '012' and m != p:\n                return False\n        return True\n    if pred == 'disjoint':\n        return match('FF*FF****')\n    if pred == 'intersects':\n        return not match('FF*FF****')\n    if pred == 'touches':\n        return True and (match('FT*******') or match('F**T*****') or match('F***T****'))\n    if pred == 'within':\n        return match('T*F**F***')\n    if pred == 'contains':\n        return match('T*****FF*')\n    if pred == 'covers':\n        return any(match(p) for p in ('T*****FF*', '*T****FF*', '***T**FF*', '****T*FF*'))\n    if pred == 'overlaps':\n        if da != db:\n            return False\n        return match('1*T***T**') if da == 1 else match('T*T***T**')\n    if pred == 'crosses':\n        if da < db:\n            return match('T*T******')\n        if da > db:\n            return match('T*****T**')\n        return da == 1 and match('0********')\n    if pred == 'equals':\n        return match('T*F**FFF*')\n    return None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control #0', ['FF2F11212', 'crosses', 2, 2], False), ('control #1', ['FF2F11212', 'intersects', 2, 2], True), ('control #2', ['FF2F11212', 'within', 2, 2], False), ('control #3', ['FF2F11212', 'touches', 2, 2], True), ('control #4', ['212101212', 'overlaps', 2, 2], True), ('control #5', ['212101212', 'crosses', 2, 2], False), ('regression #93', ['F0FFFF102', 'touches', 0, 1], True), ('regression #121', ['F0FFFFFF2', 'touches', 0, 0], False)], [('control #3', ['FF2F11212', 'touches', 2, 2], True), ('control #4', ['212101212', 'overlaps', 2, 2], True), ('control #5', ['212101212', 'crosses', 2, 2], False), ('control #6', ['212101212', 'touches', 2, 2], False), ('control #7', ['212101212', 'intersects', 2, 2], True), ('control #8', ['2FF1FF212', 'contains', 2, 2], False), ('regression #93', ['F0FFFF102', 'touches', 0, 1], True), ('regression #121', ['F0FFFFFF2', 'touches', 0, 0], False)], [('control #6', ['212101212', 'touches', 2, 2], False), ('control #7', ['212101212', 'intersects', 2, 2], True), ('control #8', ['2FF1FF212', 'contains', 2, 2], False), ('control #9', ['2FF1FF212', 'crosses', 2, 2], False), ('control #10', ['2FF1FF212', 'intersects', 2, 2], True), ('control #11', ['2FF1FF212', 'disjoint', 2, 2], False), ('regression #93', ['F0FFFF102', 'touches', 0, 1], True), ('regression #121', ['F0FFFFFF2', 'touches', 0, 0], False)], [('control #9', ['2FF1FF212', 'crosses', 2, 2], False), ('control #10', ['2FF1FF212', 'intersects', 2, 2], True), ('control #11', ['2FF1FF212', 'disjoint', 2, 2], False), ('control #12', ['212FF1FF2', 'intersects', 2, 2], True), ('control #13', ['212FF1FF2', 'contains', 2, 2], True), ('control #14', ['212FF1FF2', 'covers', 2, 2], True), ('regression #93', ['F0FFFF102', 'touches', 0, 1], True), ('regression #121', ['F0FFFFFF2', 'touches', 0, 0], False)], [('control #12', ['212FF1FF2', 'intersects', 2, 2], True), ('control #13', ['212FF1FF2', 'contains', 2, 2], True), ('control #14', ['212FF1FF2', 'covers', 2, 2], True), ('control #15', ['212FF1FF2', 'disjoint', 2, 2], False), ('control #16', ['2FF1FF2F2', 'equals', 2, 2], False), ('control #17', ['2FF1FF2F2', 'disjoint', 2, 2], False), ('regression #93', ['F0FFFF102', 'touches', 0, 1], True), ('regression #121', ['F0FFFFFF2', 'touches', 0, 0], False)]]\nfor label, args, expected in fixtures[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":"4a68062e203f2c20fe8dc7aefb90f8fe71161dfd1c7a39f0d8726fff25f1d73e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    matrix, pred, da, db = x\n    def match(pattern):\n        for m, p in zip(matrix, pattern):\n            if p == '*':\n                continue\n            if p == 'T' and m == 'F':\n                return False\n            if p == 'F' and m != 'F':\n                return False\n            if p in '012' and m != p:\n                return False\n        return True\n    if pred == 'disjoint':\n        return match('FF*FF****')\n    if pred == 'intersects':\n        return not match('FF*FF****')\n    if pred == 'touches':\n        return (da, db) != (0, 0) and (match('FT*******') or match('F**T*****') or match('F***T****'))\n    if pred == 'within':\n        return match('T*F**F***')\n    if pred == 'contains':\n        return match('T*****FF*')\n    if pred == 'covers':\n        return any(match(p) for p in ('T*****FF*', '*T****FF*', '***T**FF*', '****T*FF*'))\n    if pred == 'overlaps':\n        if da != db:\n            return False\n        return match('1*T***T**') if da == 1 else match('T*T***T**')\n    if pred == 'crosses':\n        if da < db:\n            return match('T*T******')\n        if da > db:\n            return match('T*****T**')\n        return da == 1 and match('0********')\n    if pred == 'equals':\n        return match('T*F**FFF*')\n    return None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control #0', ['FF2F11212', 'crosses', 2, 2], False), ('control #1', ['FF2F11212', 'intersects', 2, 2], True), ('control #2', ['FF2F11212', 'within', 2, 2], False), ('control #3', ['FF2F11212', 'touches', 2, 2], True), ('control #4', ['212101212', 'overlaps', 2, 2], True), ('control #5', ['212101212', 'crosses', 2, 2], False), ('regression #93', ['F0FFFF102', 'touches', 0, 1], True), ('regression #121', ['F0FFFFFF2', 'touches', 0, 0], False)], [('control #3', ['FF2F11212', 'touches', 2, 2], True), ('control #4', ['212101212', 'overlaps', 2, 2], True), ('control #5', ['212101212', 'crosses', 2, 2], False), ('control #6', ['212101212', 'touches', 2, 2], False), ('control #7', ['212101212', 'intersects', 2, 2], True), ('control #8', ['2FF1FF212', 'contains', 2, 2], False), ('regression #93', ['F0FFFF102', 'touches', 0, 1], True), ('regression #121', ['F0FFFFFF2', 'touches', 0, 0], False)], [('control #6', ['212101212', 'touches', 2, 2], False), ('control #7', ['212101212', 'intersects', 2, 2], True), ('control #8', ['2FF1FF212', 'contains', 2, 2], False), ('control #9', ['2FF1FF212', 'crosses', 2, 2], False), ('control #10', ['2FF1FF212', 'intersects', 2, 2], True), ('control #11', ['2FF1FF212', 'disjoint', 2, 2], False), ('regression #93', ['F0FFFF102', 'touches', 0, 1], True), ('regression #121', ['F0FFFFFF2', 'touches', 0, 0], False)], [('control #9', ['2FF1FF212', 'crosses', 2, 2], False), ('control #10', ['2FF1FF212', 'intersects', 2, 2], True), ('control #11', ['2FF1FF212', 'disjoint', 2, 2], False), ('control #12', ['212FF1FF2', 'intersects', 2, 2], True), ('control #13', ['212FF1FF2', 'contains', 2, 2], True), ('control #14', ['212FF1FF2', 'covers', 2, 2], True), ('regression #93', ['F0FFFF102', 'touches', 0, 1], True), ('regression #121', ['F0FFFFFF2', 'touches', 0, 0], False)], [('control #12', ['212FF1FF2', 'intersects', 2, 2], True), ('control #13', ['212FF1FF2', 'contains', 2, 2], True), ('control #14', ['212FF1FF2', 'covers', 2, 2], True), ('control #15', ['212FF1FF2', 'disjoint', 2, 2], False), ('control #16', ['2FF1FF2F2', 'equals', 2, 2], False), ('control #17', ['2FF1FF2F2', 'disjoint', 2, 2], False), ('regression #93', ['F0FFFF102', 'touches', 0, 1], True), ('regression #121', ['F0FFFFFF2', 'touches', 0, 0], False)]]\nfor label, args, expected in fixtures[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":"Stipulated deterministic toy contract on a bounded input domain; results are rounded as stated and no conformance with any published standard or library is claimed. 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-gis-polygon-topology-de9im-named-predicates-touches-point-pair-exclusion","generated_at":"2026-09-29T14:48:20.576065+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Spatial SQL predicates, topology rules and QA checks are expressed as DE-9IM patterns; a wrong pattern changes join results silently.","repair":"At the touches point pair exclusion step restore `(da, db) != (0, 0) and`, leaving the rest of the model unchanged.","root_cause":"The rule that touches is undefined for point/point inputs is omitted.","sha256":"c74d0021b636ef235eda4ad42c34a214737bf31295c8a05ada733b0b7c5f7bdb","title":"DE-9IM matrix named predicate evaluation: touches point pair exclusion · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.762,"exit_code":1,"observations":[{"actual":false,"check":"control #0","expected":false,"passed":true},{"actual":true,"check":"control #1","expected":true,"passed":true},{"actual":false,"check":"control #2","expected":false,"passed":true},{"actual":true,"check":"control #3","expected":true,"passed":true},{"actual":true,"check":"control #4","expected":true,"passed":true},{"actual":false,"check":"control #5","expected":false,"passed":true},{"actual":false,"check":"regression #93","expected":true,"passed":false},{"actual":false,"check":"regression #121","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"control #1\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"control #2\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"control #3\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"control #4\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"control #5\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"regression #93\", \"actual\": false, \"expected\": true, \"passed\": false}, {\"check\": \"regression #121\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.083,"exit_code":1,"observations":[{"actual":false,"check":"control #0","expected":false,"passed":true},{"actual":true,"check":"control #1","expected":true,"passed":true},{"actual":false,"check":"control #2","expected":false,"passed":true},{"actual":true,"check":"control #3","expected":true,"passed":true},{"actual":true,"check":"control #4","expected":true,"passed":true},{"actual":false,"check":"control #5","expected":false,"passed":true},{"actual":true,"check":"regression #93","expected":true,"passed":true},{"actual":true,"check":"regression #121","expected":false,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"control #1\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"control #2\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"control #3\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"control #4\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"control #5\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"regression #93\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"regression #121\", \"actual\": true, \"expected\": false, \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.361,"exit_code":0,"observations":[{"actual":false,"check":"control #0","expected":false,"passed":true},{"actual":true,"check":"control #1","expected":true,"passed":true},{"actual":false,"check":"control #2","expected":false,"passed":true},{"actual":true,"check":"control #3","expected":true,"passed":true},{"actual":true,"check":"control #4","expected":true,"passed":true},{"actual":false,"check":"control #5","expected":false,"passed":true},{"actual":true,"check":"regression #93","expected":true,"passed":true},{"actual":false,"check":"regression #121","expected":false,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"control #1\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"control #2\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"control #3\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"control #4\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"control #5\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"regression #93\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"regression #121\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}