broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(leaves, ops):
    allowed=set(leaves); live=set(); out=[]
    for op,arg in ops:
        if op=='init':
            live.update(set(arg)&allowed); out.append(sorted(live))
        elif op=='move':
            ok=arg in live
            if ok: live.remove(arg)
            out.append(ok)
        elif op=='read': out.append(arg in live)
        elif op=='whole': out.append(live==allowed)
        elif op=='assign':
            if arg in allowed: live.add(arg)
            out.append(sorted(live))
        elif op=='drop':
            out.append(sorted(live)); live.clear()
        elif op=='reset':
            live.clear(); out.append([])
        elif op=='copy': out.append(arg in live); live.discard(arg)
        elif op=='merge':
            live.intersection_update(arg); out.append(sorted(live))
        elif op=='available': out.append(sorted(live))
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='v'+str(N)
check('unknown init',solve(['a'],[('init',['a',x])]),[['a']])
check('last move',solve(['a'],[('init',['a']),('move','a'),('read','a')]),[['a'],True,False])
check('uninitialized sibling',solve(['a','b'],[('init',['a']),('read','b')]),[['a'],False])
check('empty whole',solve([], [('whole',None)]),[True])
check('partial whole',solve(['a','b'],[('init',['a']),('whole',None)]),[['a'],False])
check('reassign empty',solve(['a'],[('assign','a'),('read','a')]),[['a'],True])
check('drop clears',solve(['a'],[('init',['a']),('drop',None),('read','a')]),[['a'],['a'],False])
check('storage reset',solve(['a'],[('init',['a']),('reset',None),('read','a')]),[['a'],[],False])
check('copy preserves',solve(['a'],[('init',['a']),('copy','a'),('read','a')]),[['a'],True,True])
check('join intersection',solve(['a','b'],[('init',['a']),('merge',['b']),('available',None)]),[['a'],[],[]])
check('available subset',solve(['a','b'],[('init',['a']),('available',None)]),[['a'],['a']])
check('variant leaf',solve([x],[('init',[x]),('move',x),('available',None)]),[[x],True,[]])
check('record arity',solve(list(range(N+1)),[('init',list(range(N+1))),('move',N),('available',None)]),[list(range(N+1)),True,list(range(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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(leaves, ops):
    allowed=set(leaves); live=set(); out=[]
    for op,arg in ops:
        if op=='init':
            live.update(set(arg)&allowed); out.append(sorted(live))
        elif op=='move':
            ok=arg in live
            if ok: live.remove(arg)
            out.append(ok)
        elif op=='read': out.append(arg in live)
        elif op=='whole': out.append(live==allowed)
        elif op=='assign':
            if arg in allowed: live.add(arg)
            out.append(sorted(live))
        elif op=='drop':
            out.append(sorted(live)); live.clear()
        elif op=='reset':
            live.clear(); out.append([])
        elif op=='copy': out.append(arg in live); live.clear()
        elif op=='merge':
            live.intersection_update(arg); out.append(sorted(live))
        elif op=='available': out.append(sorted(live))
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='v'+str(N)
check('unknown init',solve(['a'],[('init',['a',x])]),[['a']])
check('last move',solve(['a'],[('init',['a']),('move','a'),('read','a')]),[['a'],True,False])
check('uninitialized sibling',solve(['a','b'],[('init',['a']),('read','b')]),[['a'],False])
check('empty whole',solve([], [('whole',None)]),[True])
check('partial whole',solve(['a','b'],[('init',['a']),('whole',None)]),[['a'],False])
check('reassign empty',solve(['a'],[('assign','a'),('read','a')]),[['a'],True])
check('drop clears',solve(['a'],[('init',['a']),('drop',None),('read','a')]),[['a'],['a'],False])
check('storage reset',solve(['a'],[('init',['a']),('reset',None),('read','a')]),[['a'],[],False])
check('copy preserves',solve(['a'],[('init',['a']),('copy','a'),('read','a')]),[['a'],True,True])
check('join intersection',solve(['a','b'],[('init',['a']),('merge',['b']),('available',None)]),[['a'],[],[]])
check('available subset',solve(['a','b'],[('init',['a']),('available',None)]),[['a'],['a']])
check('variant leaf',solve([x],[('init',[x]),('move',x),('available',None)]),[[x],True,[]])
check('record arity',solve(list(range(N+1)),[('init',list(range(N+1))),('move',N),('available',None)]),[list(range(N+1)),True,list(range(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)

prompt:
Copy transfer incorrectly consumes a copyable leaf.

Static path initialization lattice for a record with declared leaf names. Commands init/move/read/whole/assign/drop/reset/copy/merge/available. init and assign initialize one leaf. move consumes only initialized named leaf and reports success; read tests one; whole tests all. drop consumes all and reports previously initialized names. reset clears; copy tests without consumption. merge intersects current initialized leaves with supplied branch leaves. available returns sorted initialized names. Unknown leaves never initialize. Return one result per command. This is definite-initialization analysis, not runtime borrowing.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(leaves, ops):
    allowed=set(leaves); live=set(); out=[]
    for op,arg in ops:
        if op=='init':
            live.update(set(arg)&allowed); out.append(sorted(live))
        elif op=='move':
            ok=arg in live
            if ok: live.remove(arg)
            out.append(ok)
        elif op=='read': out.append(arg in live)
        elif op=='whole': out.append(live==allowed)
        elif op=='assign':
            if arg in allowed: live.add(arg)
            out.append(sorted(live))
        elif op=='drop':
            out.append(sorted(live)); live.clear()
        elif op=='reset':
            live.clear(); out.append([])
        elif op=='copy': out.append(arg in live)
        elif op=='merge':
            live.update(arg); out.append(sorted(live))
        elif op=='available': out.append(sorted(live))
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='v'+str(N)
check('unknown init',solve(['a'],[('init',['a',x])]),[['a']])
check('last move',solve(['a'],[('init',['a']),('move','a'),('read','a')]),[['a'],True,False])
check('uninitialized sibling',solve(['a','b'],[('init',['a']),('read','b')]),[['a'],False])
check('empty whole',solve([], [('whole',None)]),[True])
check('partial whole',solve(['a','b'],[('init',['a']),('whole',None)]),[['a'],False])
check('reassign empty',solve(['a'],[('assign','a'),('read','a')]),[['a'],True])
check('drop clears',solve(['a'],[('init',['a']),('drop',None),('read','a')]),[['a'],['a'],False])
check('storage reset',solve(['a'],[('init',['a']),('reset',None),('read','a')]),[['a'],[],False])
check('copy preserves',solve(['a'],[('init',['a']),('copy','a'),('read','a')]),[['a'],True,True])
check('join intersection',solve(['a','b'],[('init',['a']),('merge',['b']),('available',None)]),[['a'],[],[]])
check('available subset',solve(['a','b'],[('init',['a']),('available',None)]),[['a'],['a']])
check('variant leaf',solve([x],[('init',[x]),('move',x),('available',None)]),[[x],True,[]])
check('record arity',solve(list(range(N+1)),[('init',list(range(N+1))),('move',N),('available',None)]),[list(range(N+1)),True,list(range(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)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(leaves, ops):
    allowed=set(leaves); live=set(); out=[]
    for op,arg in ops:
        if op=='init':
            live.update(set(arg)&allowed); out.append(sorted(live))
        elif op=='move':
            ok=arg in live
            if ok: live.remove(arg)
            out.append(ok)
        elif op=='read': out.append(arg in live)
        elif op=='whole': out.append(live==allowed)
        elif op=='assign':
            if arg in allowed: live.add(arg)
            out.append(sorted(live))
        elif op=='drop':
            out.append(sorted(live)); live.clear()
        elif op=='reset':
            live.clear(); out.append([])
        elif op=='copy': out.append(arg in live)
        elif op=='merge':
            live=set(arg)&allowed; out.append(sorted(live))
        elif op=='available': out.append(sorted(live))
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='v'+str(N)
check('unknown init',solve(['a'],[('init',['a',x])]),[['a']])
check('last move',solve(['a'],[('init',['a']),('move','a'),('read','a')]),[['a'],True,False])
check('uninitialized sibling',solve(['a','b'],[('init',['a']),('read','b')]),[['a'],False])
check('empty whole',solve([], [('whole',None)]),[True])
check('partial whole',solve(['a','b'],[('init',['a']),('whole',None)]),[['a'],False])
check('reassign empty',solve(['a'],[('assign','a'),('read','a')]),[['a'],True])
check('drop clears',solve(['a'],[('init',['a']),('drop',None),('read','a')]),[['a'],['a'],False])
check('storage reset',solve(['a'],[('init',['a']),('reset',None),('read','a')]),[['a'],[],False])
check('copy preserves',solve(['a'],[('init',['a']),('copy','a'),('read','a')]),[['a'],True,True])
check('join intersection',solve(['a','b'],[('init',['a']),('merge',['b']),('available',None)]),[['a'],[],[]])
check('available subset',solve(['a','b'],[('init',['a']),('available',None)]),[['a'],['a']])
check('variant leaf',solve([x],[('init',[x]),('move',x),('available',None)]),[[x],True,[]])
check('record arity',solve(list(range(N+1)),[('init',list(range(N+1))),('move',N),('available',None)]),[list(range(N+1)),True,list(range(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)

prompt:
Definite initialization at a branch join retains one-arm facts.

Static path initialization lattice for a record with declared leaf names. Commands init/move/read/whole/assign/drop/reset/copy/merge/available. init and assign initialize one leaf. move consumes only initialized named leaf and reports success; read tests one; whole tests all. drop consumes all and reports previously initialized names. reset clears; copy tests without consumption. merge intersects current initialized leaves with supplied branch leaves. available returns sorted initialized names. Unknown leaves never initialize. Return one result per command. This is definite-initialization analysis, not runtime borrowing.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(leaves, ops):
    allowed=set(leaves); live=set(); out=[]
    for op,arg in ops:
        if op=='init':
            live.update(set(arg)&allowed); out.append(sorted(live))
        elif op=='move':
            ok=arg in live
            if ok: live.remove(arg)
            out.append(ok)
        elif op=='read': out.append(arg in live)
        elif op=='whole': out.append(live==allowed)
        elif op=='assign':
            if arg in allowed: live.add(arg)
            out.append(sorted(live))
        elif op=='drop':
            out.append(sorted(live)); live.clear()
        elif op=='reset':
            live.clear(); out.append([])
        elif op=='copy': out.append(arg in live)
        elif op=='merge':
            live.intersection_update(arg); out.append(sorted(live))
        elif op=='available': out.append(sorted(allowed))
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='v'+str(N)
check('unknown init',solve(['a'],[('init',['a',x])]),[['a']])
check('last move',solve(['a'],[('init',['a']),('move','a'),('read','a')]),[['a'],True,False])
check('uninitialized sibling',solve(['a','b'],[('init',['a']),('read','b')]),[['a'],False])
check('empty whole',solve([], [('whole',None)]),[True])
check('partial whole',solve(['a','b'],[('init',['a']),('whole',None)]),[['a'],False])
check('reassign empty',solve(['a'],[('assign','a'),('read','a')]),[['a'],True])
check('drop clears',solve(['a'],[('init',['a']),('drop',None),('read','a')]),[['a'],['a'],False])
check('storage reset',solve(['a'],[('init',['a']),('reset',None),('read','a')]),[['a'],[],False])
check('copy preserves',solve(['a'],[('init',['a']),('copy','a'),('read','a')]),[['a'],True,True])
check('join intersection',solve(['a','b'],[('init',['a']),('merge',['b']),('available',None)]),[['a'],[],[]])
check('available subset',solve(['a','b'],[('init',['a']),('available',None)]),[['a'],['a']])
check('variant leaf',solve([x],[('init',[x]),('move',x),('available',None)]),[[x],True,[]])
check('record arity',solve(list(range(N+1)),[('init',list(range(N+1))),('move',N),('available',None)]),[list(range(N+1)),True,list(range(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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(leaves, ops):
    allowed=set(leaves); live=set(); out=[]
    for op,arg in ops:
        if op=='init':
            live.update(set(arg)&allowed); out.append(sorted(live))
        elif op=='move':
            ok=arg in live
            if ok: live.remove(arg)
            out.append(ok)
        elif op=='read': out.append(arg in live)
        elif op=='whole': out.append(live==allowed)
        elif op=='assign':
            if arg in allowed: live.add(arg)
            out.append(sorted(live))
        elif op=='drop':
            out.append(sorted(live)); live.clear()
        elif op=='reset':
            live.clear(); out.append([])
        elif op=='copy': out.append(arg in live)
        elif op=='merge':
            live.intersection_update(arg); out.append(sorted(live))
        elif op=='available': out.append(sorted(allowed-live))
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='v'+str(N)
check('unknown init',solve(['a'],[('init',['a',x])]),[['a']])
check('last move',solve(['a'],[('init',['a']),('move','a'),('read','a')]),[['a'],True,False])
check('uninitialized sibling',solve(['a','b'],[('init',['a']),('read','b')]),[['a'],False])
check('empty whole',solve([], [('whole',None)]),[True])
check('partial whole',solve(['a','b'],[('init',['a']),('whole',None)]),[['a'],False])
check('reassign empty',solve(['a'],[('assign','a'),('read','a')]),[['a'],True])
check('drop clears',solve(['a'],[('init',['a']),('drop',None),('read','a')]),[['a'],['a'],False])
check('storage reset',solve(['a'],[('init',['a']),('reset',None),('read','a')]),[['a'],[],False])
check('copy preserves',solve(['a'],[('init',['a']),('copy','a'),('read','a')]),[['a'],True,True])
check('join intersection',solve(['a','b'],[('init',['a']),('merge',['b']),('available',None)]),[['a'],[],[]])
check('available subset',solve(['a','b'],[('init',['a']),('available',None)]),[['a'],['a']])
check('variant leaf',solve([x],[('init',[x]),('move',x),('available',None)]),[[x],True,[]])
check('record arity',solve(list(range(N+1)),[('init',list(range(N+1))),('move',N),('available',None)]),[list(range(N+1)),True,list(range(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)

prompt:
Diagnostic initialized-path enumeration reports moved leaves.

Static path initialization lattice for a record with declared leaf names. Commands init/move/read/whole/assign/drop/reset/copy/merge/available. init and assign initialize one leaf. move consumes only initialized named leaf and reports success; read tests one; whole tests all. drop consumes all and reports previously initialized names. reset clears; copy tests without consumption. merge intersects current initialized leaves with supplied branch leaves. available returns sorted initialized names. Unknown leaves never initialize. Return one result per command. This is definite-initialization analysis, not runtime borrowing.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': pass
        elif op=='return': live.add(a)
        elif op=='call': live.update(a)
        elif op=='def': live.discard(a)
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.discard(a)
        elif op=='return': live.add(a)
        elif op=='call': live.update(a)
        elif op=='def': live.discard(a)
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

prompt:
Reading a reference fails to extend its inferred loan lifetime.

Backward reference-demand transfer over a finite straight-line IR. ops execute forward and analysis traverses backward. use/return demand one reference; call demands all actual references. def and storage_dead kill a local. assign(d,s) propagates demand from destination to source, killing destination. reborrow(d,p) kills child demand and adds parent unconditionally because construction reads parent. phi(d,sources) propagates destination demand to every source. drop(ref,needs_drop) demands only when destructor can observe referent. branch supplies two already-computed successor demand sets, both unioned. Return sorted entry-demand names.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': pass
        elif op=='call': live.update(a)
        elif op=='def': live.discard(a)
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': live.clear()
        elif op=='call': live.update(a)
        elif op=='def': live.discard(a)
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

prompt:
Returned references disappear from entry lifetime obligations.

Backward reference-demand transfer over a finite straight-line IR. ops execute forward and analysis traverses backward. use/return demand one reference; call demands all actual references. def and storage_dead kill a local. assign(d,s) propagates demand from destination to source, killing destination. reborrow(d,p) kills child demand and adds parent unconditionally because construction reads parent. phi(d,sources) propagates destination demand to every source. drop(ref,needs_drop) demands only when destructor can observe referent. branch supplies two already-computed successor demand sets, both unioned. Return sorted entry-demand names.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': live.add(a)
        elif op=='call': pass
        elif op=='def': live.discard(a)
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': live.add(a)
        elif op=='call': live.update(a[:1])
        elif op=='def': live.discard(a)
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

prompt:
A call summary tracks only the first borrowed argument.

Backward reference-demand transfer over a finite straight-line IR. ops execute forward and analysis traverses backward. use/return demand one reference; call demands all actual references. def and storage_dead kill a local. assign(d,s) propagates demand from destination to source, killing destination. reborrow(d,p) kills child demand and adds parent unconditionally because construction reads parent. phi(d,sources) propagates destination demand to every source. drop(ref,needs_drop) demands only when destructor can observe referent. branch supplies two already-computed successor demand sets, both unioned. Return sorted entry-demand names.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': live.add(a)
        elif op=='call': live.update(a)
        elif op=='def': pass
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': live.add(a)
        elif op=='call': live.update(a)
        elif op=='def': live.clear()
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

prompt:
Reference definition kills demands for unrelated live locals.

Backward reference-demand transfer over a finite straight-line IR. ops execute forward and analysis traverses backward. use/return demand one reference; call demands all actual references. def and storage_dead kill a local. assign(d,s) propagates demand from destination to source, killing destination. reborrow(d,p) kills child demand and adds parent unconditionally because construction reads parent. phi(d,sources) propagates destination demand to every source. drop(ref,needs_drop) demands only when destructor can observe referent. branch supplies two already-computed successor demand sets, both unioned. Return sorted entry-demand names.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': live.add(a)
        elif op=='call': live.update(a)
        elif op=='def': live.discard(a)
        elif op=='storage_dead': pass
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': live.add(a)
        elif op=='call': live.update(a)
        elif op=='def': live.discard(a)
        elif op=='storage_dead': live.add(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

prompt:
Storage-dead boundary leaks demand into a previous local incarnation.

Backward reference-demand transfer over a finite straight-line IR. ops execute forward and analysis traverses backward. use/return demand one reference; call demands all actual references. def and storage_dead kill a local. assign(d,s) propagates demand from destination to source, killing destination. reborrow(d,p) kills child demand and adds parent unconditionally because construction reads parent. phi(d,sources) propagates destination demand to every source. drop(ref,needs_drop) demands only when destructor can observe referent. branch supplies two already-computed successor demand sets, both unioned. Return sorted entry-demand names.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': live.add(a)
        elif op=='call': live.update(a)
        elif op=='def': live.discard(a)
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(a)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': live.add(a)
        elif op=='call': live.update(a)
        elif op=='def': live.discard(a)
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed and live: live.add(b)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

prompt:
Demand on a sole destination fails to propagate to its source.

Backward reference-demand transfer over a finite straight-line IR. ops execute forward and analysis traverses backward. use/return demand one reference; call demands all actual references. def and storage_dead kill a local. assign(d,s) propagates demand from destination to source, killing destination. reborrow(d,p) kills child demand and adds parent unconditionally because construction reads parent. phi(d,sources) propagates destination demand to every source. drop(ref,needs_drop) demands only when destructor can observe referent. branch supplies two already-computed successor demand sets, both unioned. Return sorted entry-demand names.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': live.add(a)
        elif op=='call': live.update(a)
        elif op=='def': live.discard(a)
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.discard(a)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': live.add(a)
        elif op=='call': live.update(a)
        elif op=='def': live.discard(a)
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

prompt:
Reborrow construction leaves the child demanded before its definition.

Backward reference-demand transfer over a finite straight-line IR. ops execute forward and analysis traverses backward. use/return demand one reference; call demands all actual references. def and storage_dead kill a local. assign(d,s) propagates demand from destination to source, killing destination. reborrow(d,p) kills child demand and adds parent unconditionally because construction reads parent. phi(d,sources) propagates destination demand to every source. drop(ref,needs_drop) demands only when destructor can observe referent. branch supplies two already-computed successor demand sets, both unioned. Return sorted entry-demand names.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': live.add(a)
        elif op=='call': live.update(a)
        elif op=='def': live.discard(a)
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.add(a)
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': live.add(a)
        elif op=='call': live.update(a)
        elif op=='def': live.discard(a)
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b[:1])
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

prompt:
A phi reference drops origins contributed by alternate predecessors.

Backward reference-demand transfer over a finite straight-line IR. ops execute forward and analysis traverses backward. use/return demand one reference; call demands all actual references. def and storage_dead kill a local. assign(d,s) propagates demand from destination to source, killing destination. reborrow(d,p) kills child demand and adds parent unconditionally because construction reads parent. phi(d,sources) propagates destination demand to every source. drop(ref,needs_drop) demands only when destructor can observe referent. branch supplies two already-computed successor demand sets, both unioned. Return sorted entry-demand names.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': live.add(a)
        elif op=='call': live.update(a)
        elif op=='def': live.discard(a)
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            if False: live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': live.add(a)
        elif op=='call': live.update(a)
        elif op=='def': live.discard(a)
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            live.add(a)
        elif op=='branch': live.update(set(a)|set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

prompt:
A trivial reference drop spuriously extends its loan lifetime.

Backward reference-demand transfer over a finite straight-line IR. ops execute forward and analysis traverses backward. use/return demand one reference; call demands all actual references. def and storage_dead kill a local. assign(d,s) propagates demand from destination to source, killing destination. reborrow(d,p) kills child demand and adds parent unconditionally because construction reads parent. phi(d,sources) propagates destination demand to every source. drop(ref,needs_drop) demands only when destructor can observe referent. branch supplies two already-computed successor demand sets, both unioned. Return sorted entry-demand names.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': live.add(a)
        elif op=='call': live.update(a)
        elif op=='def': live.discard(a)
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(set(a)&set(b))
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ops):
    live=set()
    for op,a,b in reversed(ops):
        if op=='use': live.add(a)
        elif op=='return': live.add(a)
        elif op=='call': live.update(a)
        elif op=='def': live.discard(a)
        elif op=='storage_dead': live.discard(a)
        elif op=='assign':
            needed=a in live; live.discard(a)
            if needed: live.add(b)
        elif op=='reborrow':
            live.discard(a); live.add(b)
        elif op=='phi':
            needed=a in live; live.discard(a)
            if needed: live.update(b)
        elif op=='drop':
            if b: live.add(a)
        elif op=='branch': live.update(a)
    return sorted(live)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='r'+str(N)
check('empty',solve([]),[])
check('use',solve([('use',x,None)]),[x])
check('return',solve([('return',x,None)]),[x])
check('call',solve([('call',['a',x],None)]),['a',x])
check('definition',solve([('def','a',None),('use','a',None),('use',x,None)]),[x])
check('dead boundary',solve([('storage_dead','a',None),('use','a',None)]),[])
check('assign demanded',solve([('assign','a',x),('use','a',None)]),[x])
check('reborrow constructor',solve([('reborrow','a',x),('use','a',None)]),[x])
check('phi second origin',solve([('phi','a',['b',x]),('use','a',None)]),['b',x])
check('trivial drop',solve([('drop',x,False)]),[])
check('observing drop',solve([('drop',x,True)]),[x])
check('branch union',solve([('branch',['a'],[x])]),['a',x])
check('variable arity',solve([('call',list(range(N+1)),None)]),list(range(N+1)))
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)

prompt:
Branch liveness loses references demanded only on its second successor.

Backward reference-demand transfer over a finite straight-line IR. ops execute forward and analysis traverses backward. use/return demand one reference; call demands all actual references. def and storage_dead kill a local. assign(d,s) propagates demand from destination to source, killing destination. reborrow(d,p) kills child demand and adds parent unconditionally because construction reads parent. phi(d,sources) propagates destination demand to every source. drop(ref,needs_drop) demands only when destructor can observe referent. branch supplies two already-computed successor demand sets, both unioned. Return sorted entry-demand names.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(regions, edges, equalities, demands, universal, forbidden):
    names=set(a for a,b in edges)
    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,[])) 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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(regions, edges, equalities, demands, universal, forbidden):
    names=set(a for a,b in edges)|set(b for a,b in edges)
    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,[])) 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)

prompt:
Disconnected region declarations vanish from the constraint solution.

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.

split: open-access


broken_source:
"""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 [{},[]]
    links=list(edges)
    for a,b in equalities: links.extend([(a,b),(b,a)])
    points={r:set(demands.get(r,[])) 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)

source:
"""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 None
    links=list(edges)
    for a,b in equalities: links.extend([(a,b),(b,a)])
    points={r:set(demands.get(r,[])) 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)

prompt:
A missing endpoint in an equality is not diagnosed.

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.

split: open-access


broken_source:
"""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=[]
    for a,b in equalities: links.extend([(a,b),(b,a)])
    points={r:set(demands.get(r,[])) 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)

source:
"""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[:1])
    for a,b in equalities: links.extend([(a,b),(b,a)])
    points={r:set(demands.get(r,[])) 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)

prompt:
Only the first declared outlives constraint enters the solver.

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.

split: open-access


broken_source:
"""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)])
    points={r:set(demands.get(r,[])) 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)

source:
"""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([(b,a)])
    points={r:set(demands.get(r,[])) 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)

prompt:
Region equality propagates points in only one direction.

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.

split: open-access


broken_source:
"""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)

source:
"""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)

prompt:
Multiple use points of a region collapse to its first demand.

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.

split: open-access


broken_source:
"""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,[])) for r in names}
    for r in names: points[r].update([])
    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)

source:
"""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,[])) for r in names}
    for r in names: points[r]=set(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)

prompt:
External lifetime seeds replace local use demands.

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.

split: open-access


broken_source:
"""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,[])) 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[b].update(points[a])
            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)

source:
"""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,[])) 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].intersection_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)

prompt:
Outlives propagation removes required points instead of accumulating them.

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.

split: open-access