FA-43061 / Borrow checking / Open access
Multiple use points of a region collapse to its first demand · case 01
Multiple use points of a region collapse to its first demand.
ROOT CAUSE
The static analyzer mishandles own demand: multiple use points of a region collapse to its first demand.
THE FAILURE
The static analyzer mishandles own demand: multiple use points of a region collapse to its first demand.
Unsuccessful approach: The partial repair uses points={r:set(demands.get(r,[])[:1]) for r in names}, which still violates the stipulated analysis contract.
Case contract
Solve finite outlives constraints a:b meaning a contains b. regions is universe, edges named constraints, equalities are bidirectional, demands maps region to points, universal maps region to required external points, forbidden maps region to points forbidden by storage scope. Compute least fixed point. Unknown edge endpoints produce error unknown; own seeds are retained; report sorted point sets and region names violating forbidden points. The static solution includes disconnected regions and propagates through cycles.
Why this case matters
A finite offline static-analysis model of ownership and borrowing; it does not execute the analyzed program.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(regions, edges, equalities, demands, universal, forbidden):
names=set(regions)
if any(a not in names or b not in names for a,b in edges+equalities): return 'unknown'
links=list(edges)
for a,b in equalities: links.extend([(a,b),(b,a)])
points={r:set() for r in names}
for r in names: points[r].update(universal.get(r,[]))
changed=True
while changed:
changed=False
for a,b in links:
before=set(points[a])
points[a].update(points[b])
if points[a]!=before: changed=True
bad=sorted(r for r in names if points[r]&set(forbidden.get(r,[])))
return [dict((r,sorted(points[r])) for r in sorted(names)),bad]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty',solve([],[],[],{},{},{}),[{},[]])
check('disconnected',solve(['a'],[],[],{},{},{}),[{'a':[]},[]])
check('unknown edge',solve(['a'],[('a','z')],[],{},{},{}),'unknown')
check('unknown equality',solve(['a'],[],[('a','z')],{},{},{}),'unknown')
check('seed both',solve(['a'],[],[],{'a':[N,N+1]},{'a':[N+2]},{}),[{'a':[N,N+1,N+2]},[]])
check('equality',solve(['a','b'],[],[('a','b')],{'a':[N],'b':[N+1]},{},{}),[{'a':[N,N+1],'b':[N,N+1]},[]])
check('transitive reversed order',solve(['a','b','c'],[('a','b'),('b','c')],[],{'c':[N]},{},{}),[{'a':[N],'b':[N],'c':[N]},[]])
check('one-way',solve(['a','b'],[('a','b')],[],{'a':[N],'b':[N+1]},{},{}),[{'a':[N,N+1],'b':[N+1]},[]])
check('forbidden partial',solve(['a'],[],[],{'a':[N,N+1]},{},{'a':[N]}),[{'a':[N,N+1]},['a']])
check('empty not forbidden',solve(['a'],[],[],{},{},{'a':[N]}),[{'a':[]},[]])
check('cycle',solve(['a','b'],[('a','b'),('b','a')],[],{'a':[N]},{},{}),[{'a':[N],'b':[N]},[]])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| empty | [{}, []] | [{}, []] | Passed |
| disconnected | [{'a': []}, []] | [{'a': []}, []] | Passed |
| unknown edge | unknown | unknown | Passed |
| unknown equality | unknown | unknown | Passed |
| seed both | [{'a': [3]}, []] | [{'a': [1, 2, 3]}, []] | Failed |
| equality | [{'a': [], 'b': []}, []] | [{'a': [1, 2], 'b': [1, 2]}, []] | Failed |
| transitive reversed order | [{'a': [], 'b': [], 'c': []}, []] | [{'a': [1], 'b': [1], 'c': [1]}, []] | Failed |
| one-way | [{'a': [], 'b': []}, []] | [{'a': [1, 2], 'b': [2]}, []] | Failed |
| forbidden partial | [{'a': []}, []] | [{'a': [1, 2]}, ['a']] | Failed |
| empty not forbidden | [{'a': []}, []] | [{'a': []}, []] | Passed |
| cycle | [{'a': [], 'b': []}, []] | [{'a': [1], 'b': [1]}, []] | Failed |
SHA-256 / 25e098ad36489a37231d97b70be5cbbcb41c86fecca23d6f237b348153a53305
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(regions, edges, equalities, demands, universal, forbidden):
names=set(regions)
if any(a not in names or b not in names for a,b in edges+equalities): return 'unknown'
links=list(edges)
for a,b in equalities: links.extend([(a,b),(b,a)])
points={r:set(demands.get(r,[])[:1]) for r in names}
for r in names: points[r].update(universal.get(r,[]))
changed=True
while changed:
changed=False
for a,b in links:
before=set(points[a])
points[a].update(points[b])
if points[a]!=before: changed=True
bad=sorted(r for r in names if points[r]&set(forbidden.get(r,[])))
return [dict((r,sorted(points[r])) for r in sorted(names)),bad]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty',solve([],[],[],{},{},{}),[{},[]])
check('disconnected',solve(['a'],[],[],{},{},{}),[{'a':[]},[]])
check('unknown edge',solve(['a'],[('a','z')],[],{},{},{}),'unknown')
check('unknown equality',solve(['a'],[],[('a','z')],{},{},{}),'unknown')
check('seed both',solve(['a'],[],[],{'a':[N,N+1]},{'a':[N+2]},{}),[{'a':[N,N+1,N+2]},[]])
check('equality',solve(['a','b'],[],[('a','b')],{'a':[N],'b':[N+1]},{},{}),[{'a':[N,N+1],'b':[N,N+1]},[]])
check('transitive reversed order',solve(['a','b','c'],[('a','b'),('b','c')],[],{'c':[N]},{},{}),[{'a':[N],'b':[N],'c':[N]},[]])
check('one-way',solve(['a','b'],[('a','b')],[],{'a':[N],'b':[N+1]},{},{}),[{'a':[N,N+1],'b':[N+1]},[]])
check('forbidden partial',solve(['a'],[],[],{'a':[N,N+1]},{},{'a':[N]}),[{'a':[N,N+1]},['a']])
check('empty not forbidden',solve(['a'],[],[],{},{},{'a':[N]}),[{'a':[]},[]])
check('cycle',solve(['a','b'],[('a','b'),('b','a')],[],{'a':[N]},{},{}),[{'a':[N],'b':[N]},[]])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| empty | [{}, []] | [{}, []] | Passed |
| disconnected | [{'a': []}, []] | [{'a': []}, []] | Passed |
| unknown edge | unknown | unknown | Passed |
| unknown equality | unknown | unknown | Passed |
| seed both | [{'a': [1, 3]}, []] | [{'a': [1, 2, 3]}, []] | Failed |
| equality | [{'a': [1, 2], 'b': [1, 2]}, []] | [{'a': [1, 2], 'b': [1, 2]}, []] | Passed |
| transitive reversed order | [{'a': [1], 'b': [1], 'c': [1]}, []] | [{'a': [1], 'b': [1], 'c': [1]}, []] | Passed |
| one-way | [{'a': [1, 2], 'b': [2]}, []] | [{'a': [1, 2], 'b': [2]}, []] | Passed |
| forbidden partial | [{'a': [1]}, ['a']] | [{'a': [1, 2]}, ['a']] | Failed |
| empty not forbidden | [{'a': []}, []] | [{'a': []}, []] | Passed |
| cycle | [{'a': [1], 'b': [1]}, []] | [{'a': [1], 'b': [1]}, []] | Passed |
SHA-256 / ea704993165ada484dd482fa1360bf04b1ee526839dc89365b9c3003aba0754d
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 11 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
The explicitly stated toy language is the complete scope; this is not a production compiler or a claim about Rust semantics. 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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:43:58.180376+00:00.
Case digest / 57e0689b45d607803a588dbb89870643d4764664c0923d91195d52ac0f37f9d4