{"abstract":"reshape view requires coalescible strides.","category":"Tensor stride and reshape semantics","checks":6,"contract":"For row-major contiguous source only, reshape to same element count is a view; report false for noncontiguous source.","contract_signature":"shape, strides, target","evaluation_group":"tensor-reshape-contiguous-check","failed_approach":"Checking unit-axis strides too rejects valid views because those strides do not affect addresses.","family":"w3-tensor-stride-reshape-reshape-contiguous-check","id":"FA-98776","implementations":{"attempt":{"sha256":"d89ece8a9c8353ab5775a4cb18fe7795aa0a5ec508605e55f9873e9ec9958104","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shape, strides, target):\n    expected=1\n    for d,s in zip(reversed(shape),reversed(strides)):\n     if s!=expected: return False\n     expected*=d\n    return __import__(\"math\").prod(shape)==__import__(\"math\").prod(target)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contiguous flatten',solve([N,3],[3,1],[3*N]),True)\ncheck('transpose cannot flatten',solve([2,3],[1,2],[6]),False)\ncheck('contiguous split',solve([2,3],[3,1],[2,1,3]),True)\ncheck('pitched axis',solve([2,3],[4,1],[6]),False)\ncheck('singleton arbitrary stride',solve([1,3],[99,1],[3]),True)\ncheck('wrong count',solve([2,3],[3,1],[5]),False)\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":"f53c70732389db4a3ce611b1c18353c782e5430eab036d29cfe85d332b778271","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shape, strides, target):\n    return __import__('math').prod(shape)==__import__('math').prod(target)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contiguous flatten',solve([N,3],[3,1],[3*N]),True)\ncheck('transpose cannot flatten',solve([2,3],[1,2],[6]),False)\ncheck('contiguous split',solve([2,3],[3,1],[2,1,3]),True)\ncheck('pitched axis',solve([2,3],[4,1],[6]),False)\ncheck('singleton arbitrary stride',solve([1,3],[99,1],[3]),True)\ncheck('wrong count',solve([2,3],[3,1],[5]),False)\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":"Self-contained integer metadata models only; no production framework compatibility or performance claim. 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":"w3-tensor-stride-reshape-reshape-contiguous-check","generated_at":"2026-09-30T16:48:16.724598+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Dense tensor views rely on consistent logical coordinates and physical storage addresses.","root_cause":"Equal element counts alone do not make a noncontiguous layout flattenable as a view.","sha256":"0cacac2fc16c8fd37f35b473d7a0416c44fef4b5d7e620eff4123c7b5db9a1b5","title":"Tensor views: reshape view requires coalescible strides · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":27.345,"exit_code":1,"observations":[{"actual":true,"check":"contiguous flatten","expected":true,"passed":true},{"actual":false,"check":"transpose cannot flatten","expected":false,"passed":true},{"actual":true,"check":"contiguous split","expected":true,"passed":true},{"actual":false,"check":"pitched axis","expected":false,"passed":true},{"actual":false,"check":"singleton arbitrary stride","expected":true,"passed":false},{"actual":false,"check":"wrong count","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contiguous flatten\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"transpose cannot flatten\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"contiguous split\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"pitched axis\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"singleton arbitrary stride\", \"actual\": false, \"expected\": true, \"passed\": false}, {\"check\": \"wrong count\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":25.744,"exit_code":1,"observations":[{"actual":true,"check":"contiguous flatten","expected":true,"passed":true},{"actual":true,"check":"transpose cannot flatten","expected":false,"passed":false},{"actual":true,"check":"contiguous split","expected":true,"passed":true},{"actual":true,"check":"pitched axis","expected":false,"passed":false},{"actual":true,"check":"singleton arbitrary stride","expected":true,"passed":true},{"actual":false,"check":"wrong count","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contiguous flatten\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"transpose cannot flatten\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"contiguous split\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"pitched axis\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"singleton arbitrary stride\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"wrong count\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}