FA-43771 / Borrow checking / Open access
An empty split result grants permission to one element · case 01
An empty split result grants permission to one element.
ROOT CAUSE
The static analyzer mishandles empty access: an empty split result grants permission to one element.
THE FAILURE
The static analyzer mishandles empty access: an empty split result grants permission to one element.
Unsuccessful approach: The partial repair uses if len(d['empty_access'])>1: errors.append('empty-access'), which still violates the stipulated analysis contract.
Case contract
Validate static proof objects for splitting borrowed slices. Bounds are half-open; split point lies in 0..length; children exactly partition parent; exclusive children disjoint; every child retains parent owner and generation; dynamic indices need inequality proof; empty children confer no element access; strided loans include every enumerated element; reverse views retain original element addresses; consuming split removes parent exclusive capability. Input is a fully explicit descriptor of the stated toy IR. Return rule identifiers in declaration order; absent optional obligations use the provided neutral defaults. No rule is an assertion about a production language.
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(d):
errors=[]
if d['split']<0 or d['split']>d['length']: errors.append('split-boundary')
if set(d['left'])|set(d['right'])!=set(d['parent']): errors.append('partition-completeness')
if bool(set(d['exclusive_a'])&set(d['exclusive_b'])): errors.append('exclusive-disjoint')
if any(x!=d['owner'] for x in d['child_owners']): errors.append('owner-preservation')
if any(x!=d['generation'] for x in d['child_generations']): errors.append('generation-preservation')
if d['dynamic_pair'] and not d['inequality_proven']: errors.append('dynamic-disjoint-proof')
if False: errors.append('empty-access')
if set(d['stride_indices'])!=set(d['enumerated']): errors.append('strided-footprint')
if d['reverse_actual']!=d['reverse_expected']: errors.append('reverse-addresses')
if d['consuming'] and d['parent_unique_live']: errors.append('split-consumption')
return errors
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'length': 0, 'split': 0, 'left': [], 'right': [], 'parent': [], 'exclusive_a': [], 'exclusive_b': [], 'child_owners': [], 'owner': None, 'child_generations': [], 'generation': 0, 'dynamic_pair': False, 'inequality_proven': True, 'empty_access': [], 'stride_indices': [], 'enumerated': [], 'reverse_expected': [], 'reverse_actual': [], 'consuming': False, 'parent_unique_live': False}
check('well formed empty obligations',solve(base),[])
check('split-boundary regression 0', solve(dict(base, **({'length':N,'split':N+1}))), ['split-boundary'])
check('split-boundary regression 1', solve(dict(base, **({'length':N+1,'split':N+2}))), ['split-boundary'])
check('partition-completeness regression 0', solve(dict(base, **({'parent':list(range(N+1)),'left':[0]}))), ['partition-completeness'])
check('partition-completeness regression 1', solve(dict(base, **({'parent':[N,N+1],'right':[N]}))), ['partition-completeness'])
check('exclusive-disjoint regression 0', solve(dict(base, **({'exclusive_a':[N,N+1],'exclusive_b':[N+1]}))), ['exclusive-disjoint'])
check('exclusive-disjoint regression 1', solve(dict(base, **({'exclusive_a':[N],'exclusive_b':[N,N+1]}))), ['exclusive-disjoint'])
check('owner-preservation regression 0', solve(dict(base, **({'owner':'r','child_owners':['r','s']}))), ['owner-preservation'])
check('owner-preservation regression 1', solve(dict(base, **({'owner':N,'child_owners':[N,N+1]}))), ['owner-preservation'])
check('generation-preservation regression 0', solve(dict(base, **({'generation':N+1,'child_generations':[N]}))), ['generation-preservation'])
check('generation-preservation regression 1', solve(dict(base, **({'generation':N+2,'child_generations':[N+1]}))), ['generation-preservation'])
check('dynamic-disjoint-proof regression 0', solve(dict(base, **({'dynamic_pair':True,'inequality_proven':False,'length':N}))), ['dynamic-disjoint-proof'])
check('dynamic-disjoint-proof regression 1', solve(dict(base, **({'dynamic_pair':True,'inequality_proven':False,'length':N+1}))), ['dynamic-disjoint-proof'])
check('empty-access regression 0', solve(dict(base, **({'empty_access':[N]}))), ['empty-access'])
check('empty-access regression 1', solve(dict(base, **({'empty_access':[N+1]}))), ['empty-access'])
check('strided-footprint regression 0', solve(dict(base, **({'stride_indices':[N,N+2],'enumerated':[N,N+1]}))), ['strided-footprint'])
check('strided-footprint regression 1', solve(dict(base, **({'stride_indices':[N,N+3],'enumerated':[N,N+2]}))), ['strided-footprint'])
check('reverse-addresses regression 0', solve(dict(base, **({'reverse_actual':[N,N+1],'reverse_expected':[N+1,N]}))), ['reverse-addresses'])
check('reverse-addresses regression 1', solve(dict(base, **({'reverse_actual':[N,N+1,N+2],'reverse_expected':[N+2,N+1,N]}))), ['reverse-addresses'])
check('split-consumption regression 0', solve(dict(base, **({'consuming':True,'parent_unique_live':True,'parent':[N],'left':[N]}))), ['split-consumption'])
check('split-consumption regression 1', solve(dict(base, **({'consuming':True,'parent_unique_live':True,'parent':[N+1],'right':[N+1]}))), ['split-consumption'])
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 |
|---|---|---|---|
| well formed empty obligations | [] | [] | Passed |
| split-boundary regression 0 | ['split-boundary'] | ['split-boundary'] | Passed |
| split-boundary regression 1 | ['split-boundary'] | ['split-boundary'] | Passed |
| partition-completeness regression 0 | ['partition-completeness'] | ['partition-completeness'] | Passed |
| partition-completeness regression 1 | ['partition-completeness'] | ['partition-completeness'] | Passed |
| exclusive-disjoint regression 0 | ['exclusive-disjoint'] | ['exclusive-disjoint'] | Passed |
| exclusive-disjoint regression 1 | ['exclusive-disjoint'] | ['exclusive-disjoint'] | Passed |
| owner-preservation regression 0 | ['owner-preservation'] | ['owner-preservation'] | Passed |
| owner-preservation regression 1 | ['owner-preservation'] | ['owner-preservation'] | Passed |
| generation-preservation regression 0 | ['generation-preservation'] | ['generation-preservation'] | Passed |
| generation-preservation regression 1 | ['generation-preservation'] | ['generation-preservation'] | Passed |
| dynamic-disjoint-proof regression 0 | ['dynamic-disjoint-proof'] | ['dynamic-disjoint-proof'] | Passed |
| dynamic-disjoint-proof regression 1 | ['dynamic-disjoint-proof'] | ['dynamic-disjoint-proof'] | Passed |
| empty-access regression 0 | [] | ['empty-access'] | Failed |
| empty-access regression 1 | [] | ['empty-access'] | Failed |
| strided-footprint regression 0 | ['strided-footprint'] | ['strided-footprint'] | Passed |
| strided-footprint regression 1 | ['strided-footprint'] | ['strided-footprint'] | Passed |
| reverse-addresses regression 0 | ['reverse-addresses'] | ['reverse-addresses'] | Passed |
| reverse-addresses regression 1 | ['reverse-addresses'] | ['reverse-addresses'] | Passed |
| split-consumption regression 0 | ['split-consumption'] | ['split-consumption'] | Passed |
| split-consumption regression 1 | ['split-consumption'] | ['split-consumption'] | Passed |
SHA-256 / 94ca6d9b1e746795c7de14a0a5c90f6185a15756f8f165c76fd6668fd4692ee3
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
errors=[]
if d['split']<0 or d['split']>d['length']: errors.append('split-boundary')
if set(d['left'])|set(d['right'])!=set(d['parent']): errors.append('partition-completeness')
if bool(set(d['exclusive_a'])&set(d['exclusive_b'])): errors.append('exclusive-disjoint')
if any(x!=d['owner'] for x in d['child_owners']): errors.append('owner-preservation')
if any(x!=d['generation'] for x in d['child_generations']): errors.append('generation-preservation')
if d['dynamic_pair'] and not d['inequality_proven']: errors.append('dynamic-disjoint-proof')
if len(d['empty_access'])>1: errors.append('empty-access')
if set(d['stride_indices'])!=set(d['enumerated']): errors.append('strided-footprint')
if d['reverse_actual']!=d['reverse_expected']: errors.append('reverse-addresses')
if d['consuming'] and d['parent_unique_live']: errors.append('split-consumption')
return errors
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'length': 0, 'split': 0, 'left': [], 'right': [], 'parent': [], 'exclusive_a': [], 'exclusive_b': [], 'child_owners': [], 'owner': None, 'child_generations': [], 'generation': 0, 'dynamic_pair': False, 'inequality_proven': True, 'empty_access': [], 'stride_indices': [], 'enumerated': [], 'reverse_expected': [], 'reverse_actual': [], 'consuming': False, 'parent_unique_live': False}
check('well formed empty obligations',solve(base),[])
check('split-boundary regression 0', solve(dict(base, **({'length':N,'split':N+1}))), ['split-boundary'])
check('split-boundary regression 1', solve(dict(base, **({'length':N+1,'split':N+2}))), ['split-boundary'])
check('partition-completeness regression 0', solve(dict(base, **({'parent':list(range(N+1)),'left':[0]}))), ['partition-completeness'])
check('partition-completeness regression 1', solve(dict(base, **({'parent':[N,N+1],'right':[N]}))), ['partition-completeness'])
check('exclusive-disjoint regression 0', solve(dict(base, **({'exclusive_a':[N,N+1],'exclusive_b':[N+1]}))), ['exclusive-disjoint'])
check('exclusive-disjoint regression 1', solve(dict(base, **({'exclusive_a':[N],'exclusive_b':[N,N+1]}))), ['exclusive-disjoint'])
check('owner-preservation regression 0', solve(dict(base, **({'owner':'r','child_owners':['r','s']}))), ['owner-preservation'])
check('owner-preservation regression 1', solve(dict(base, **({'owner':N,'child_owners':[N,N+1]}))), ['owner-preservation'])
check('generation-preservation regression 0', solve(dict(base, **({'generation':N+1,'child_generations':[N]}))), ['generation-preservation'])
check('generation-preservation regression 1', solve(dict(base, **({'generation':N+2,'child_generations':[N+1]}))), ['generation-preservation'])
check('dynamic-disjoint-proof regression 0', solve(dict(base, **({'dynamic_pair':True,'inequality_proven':False,'length':N}))), ['dynamic-disjoint-proof'])
check('dynamic-disjoint-proof regression 1', solve(dict(base, **({'dynamic_pair':True,'inequality_proven':False,'length':N+1}))), ['dynamic-disjoint-proof'])
check('empty-access regression 0', solve(dict(base, **({'empty_access':[N]}))), ['empty-access'])
check('empty-access regression 1', solve(dict(base, **({'empty_access':[N+1]}))), ['empty-access'])
check('strided-footprint regression 0', solve(dict(base, **({'stride_indices':[N,N+2],'enumerated':[N,N+1]}))), ['strided-footprint'])
check('strided-footprint regression 1', solve(dict(base, **({'stride_indices':[N,N+3],'enumerated':[N,N+2]}))), ['strided-footprint'])
check('reverse-addresses regression 0', solve(dict(base, **({'reverse_actual':[N,N+1],'reverse_expected':[N+1,N]}))), ['reverse-addresses'])
check('reverse-addresses regression 1', solve(dict(base, **({'reverse_actual':[N,N+1,N+2],'reverse_expected':[N+2,N+1,N]}))), ['reverse-addresses'])
check('split-consumption regression 0', solve(dict(base, **({'consuming':True,'parent_unique_live':True,'parent':[N],'left':[N]}))), ['split-consumption'])
check('split-consumption regression 1', solve(dict(base, **({'consuming':True,'parent_unique_live':True,'parent':[N+1],'right':[N+1]}))), ['split-consumption'])
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 |
|---|---|---|---|
| well formed empty obligations | [] | [] | Passed |
| split-boundary regression 0 | ['split-boundary'] | ['split-boundary'] | Passed |
| split-boundary regression 1 | ['split-boundary'] | ['split-boundary'] | Passed |
| partition-completeness regression 0 | ['partition-completeness'] | ['partition-completeness'] | Passed |
| partition-completeness regression 1 | ['partition-completeness'] | ['partition-completeness'] | Passed |
| exclusive-disjoint regression 0 | ['exclusive-disjoint'] | ['exclusive-disjoint'] | Passed |
| exclusive-disjoint regression 1 | ['exclusive-disjoint'] | ['exclusive-disjoint'] | Passed |
| owner-preservation regression 0 | ['owner-preservation'] | ['owner-preservation'] | Passed |
| owner-preservation regression 1 | ['owner-preservation'] | ['owner-preservation'] | Passed |
| generation-preservation regression 0 | ['generation-preservation'] | ['generation-preservation'] | Passed |
| generation-preservation regression 1 | ['generation-preservation'] | ['generation-preservation'] | Passed |
| dynamic-disjoint-proof regression 0 | ['dynamic-disjoint-proof'] | ['dynamic-disjoint-proof'] | Passed |
| dynamic-disjoint-proof regression 1 | ['dynamic-disjoint-proof'] | ['dynamic-disjoint-proof'] | Passed |
| empty-access regression 0 | [] | ['empty-access'] | Failed |
| empty-access regression 1 | [] | ['empty-access'] | Failed |
| strided-footprint regression 0 | ['strided-footprint'] | ['strided-footprint'] | Passed |
| strided-footprint regression 1 | ['strided-footprint'] | ['strided-footprint'] | Passed |
| reverse-addresses regression 0 | ['reverse-addresses'] | ['reverse-addresses'] | Passed |
| reverse-addresses regression 1 | ['reverse-addresses'] | ['reverse-addresses'] | Passed |
| split-consumption regression 0 | ['split-consumption'] | ['split-consumption'] | Passed |
| split-consumption regression 1 | ['split-consumption'] | ['split-consumption'] | Passed |
SHA-256 / dfc9d685dc9fb304e4051916e3ec08431e35a98979756bf24af88036531e0c11
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 21 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:44:05.615049+00:00.
Case digest / c15be936caa2bb699d008d92537784226446e53b5621f189fc20a39f6e7cee5f