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

N = 1
observations = []
def solve(d):
    errors=[]
    if False: errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and len(d['moves'])>1: errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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 sole move of a structurally pinned value is accepted.

Check a toy pin-aware ownership IR. Pinned non-Unpin values may not move; field projection requires structural pin declaration; unpinned fields remain movable; replace through pinned reference requires Unpin; pinned destructor cannot move receiver; packing disallows safe pinned field references; projecting through shared pointer cannot produce unique pinned reference; converting pin to raw keeps provenance; unchecked pin construction requires an explicit immovability proof; frame relocation invalidates an earlier pin proof. Input is a fully explicit descriptor of the stated toy IR. Return rule identifiers in declaration order; absent optional obligations use the provided neutral defaults. No rule is an assertion about a production language.

split: open-access


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

N = 1
observations = []
def solve(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if False: errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if not d['structural'] and bool(d['projected']): errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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:
Pin projection assumes undeclared sibling fields are structurally pinned.

Check a toy pin-aware ownership IR. Pinned non-Unpin values may not move; field projection requires structural pin declaration; unpinned fields remain movable; replace through pinned reference requires Unpin; pinned destructor cannot move receiver; packing disallows safe pinned field references; projecting through shared pointer cannot produce unique pinned reference; converting pin to raw keeps provenance; unchecked pin construction requires an explicit immovability proof; frame relocation invalidates an earlier pin proof. Input is a fully explicit descriptor of the stated toy IR. Return rule identifiers in declaration order; absent optional obligations use the provided neutral defaults. No rule is an assertion about a production language.

split: open-access


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

N = 1
observations = []
def solve(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if False: errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if len(set(d['unpin_fields'])&set(d['blocked_fields']))>1: errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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:
Pinning a container incorrectly forbids moving an explicitly unpinned field.

Check a toy pin-aware ownership IR. Pinned non-Unpin values may not move; field projection requires structural pin declaration; unpinned fields remain movable; replace through pinned reference requires Unpin; pinned destructor cannot move receiver; packing disallows safe pinned field references; projecting through shared pointer cannot produce unique pinned reference; converting pin to raw keeps provenance; unchecked pin construction requires an explicit immovability proof; frame relocation invalidates an earlier pin proof. Input is a fully explicit descriptor of the stated toy IR. Return rule identifiers in declaration order; absent optional obligations use the provided neutral defaults. No rule is an assertion about a production language.

split: open-access


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

N = 1
observations = []
def solve(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if False: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace'] and bool(d['moves']): errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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:
Replacing a pinned referent bypasses the move prohibition.

Check a toy pin-aware ownership IR. Pinned non-Unpin values may not move; field projection requires structural pin declaration; unpinned fields remain movable; replace through pinned reference requires Unpin; pinned destructor cannot move receiver; packing disallows safe pinned field references; projecting through shared pointer cannot produce unique pinned reference; converting pin to raw keeps provenance; unchecked pin construction requires an explicit immovability proof; frame relocation invalidates an earlier pin proof. Input is a fully explicit descriptor of the stated toy IR. Return rule identifiers in declaration order; absent optional obligations use the provided neutral defaults. No rule is an assertion about a production language.

split: open-access


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

N = 1
observations = []
def solve(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if False: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move'] and not d['unpin']: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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 pinned destructor moves its receiver under a generic Unpin assumption.

Check a toy pin-aware ownership IR. Pinned non-Unpin values may not move; field projection requires structural pin declaration; unpinned fields remain movable; replace through pinned reference requires Unpin; pinned destructor cannot move receiver; packing disallows safe pinned field references; projecting through shared pointer cannot produce unique pinned reference; converting pin to raw keeps provenance; unchecked pin construction requires an explicit immovability proof; frame relocation invalidates an earlier pin proof. Input is a fully explicit descriptor of the stated toy IR. Return rule identifiers in declaration order; absent optional obligations use the provided neutral defaults. No rule is an assertion about a production language.

split: open-access


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

N = 1
observations = []
def solve(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if False: errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if len(set(d['projected'])&set(d['packed_fields']))>1: errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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 packed field is exposed by a safe pinned reference projection.

Check a toy pin-aware ownership IR. Pinned non-Unpin values may not move; field projection requires structural pin declaration; unpinned fields remain movable; replace through pinned reference requires Unpin; pinned destructor cannot move receiver; packing disallows safe pinned field references; projecting through shared pointer cannot produce unique pinned reference; converting pin to raw keeps provenance; unchecked pin construction requires an explicit immovability proof; frame relocation invalidates an earlier pin proof. Input is a fully explicit descriptor of the stated toy IR. Return rule identifiers in declaration order; absent optional obligations use the provided neutral defaults. No rule is an assertion about a production language.

split: open-access


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

N = 1
observations = []
def solve(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if False: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection'] and d['pinned']: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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:
Pin wrapper conversion manufactures exclusive access from a shared pointer.

Check a toy pin-aware ownership IR. Pinned non-Unpin values may not move; field projection requires structural pin declaration; unpinned fields remain movable; replace through pinned reference requires Unpin; pinned destructor cannot move receiver; packing disallows safe pinned field references; projecting through shared pointer cannot produce unique pinned reference; converting pin to raw keeps provenance; unchecked pin construction requires an explicit immovability proof; frame relocation invalidates an earlier pin proof. Input is a fully explicit descriptor of the stated toy IR. Return rule identifiers in declaration order; absent optional obligations use the provided neutral defaults. No rule is an assertion about a production language.

split: open-access


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

N = 1
observations = []
def solve(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if False: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if d['pin_origin'] is not None and d['raw_origin'] is None: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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:
Pinned raw projection carries a different owner provenance.

Check a toy pin-aware ownership IR. Pinned non-Unpin values may not move; field projection requires structural pin declaration; unpinned fields remain movable; replace through pinned reference requires Unpin; pinned destructor cannot move receiver; packing disallows safe pinned field references; projecting through shared pointer cannot produce unique pinned reference; converting pin to raw keeps provenance; unchecked pin construction requires an explicit immovability proof; frame relocation invalidates an earlier pin proof. Input is a fully explicit descriptor of the stated toy IR. Return rule identifiers in declaration order; absent optional obligations use the provided neutral defaults. No rule is an assertion about a production language.

split: open-access


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

N = 1
observations = []
def solve(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if False: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof'] and d['pinned']: errors.append('unchecked-pin-proof')
    if d['pin_generation']!=d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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:
Unchecked pin construction is accepted without an immovability proof obligation.

Check a toy pin-aware ownership IR. Pinned non-Unpin values may not move; field projection requires structural pin declaration; unpinned fields remain movable; replace through pinned reference requires Unpin; pinned destructor cannot move receiver; packing disallows safe pinned field references; projecting through shared pointer cannot produce unique pinned reference; converting pin to raw keeps provenance; unchecked pin construction requires an explicit immovability proof; frame relocation invalidates an earlier pin proof. Input is a fully explicit descriptor of the stated toy IR. Return rule identifiers in declaration order; absent optional obligations use the provided neutral defaults. No rule is an assertion about a production language.

split: open-access


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

N = 1
observations = []
def solve(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if False: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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(d):
    errors=[]
    if d['pinned'] and not d['unpin'] and bool(d['moves']): errors.append('pinned-move')
    if not set(d['projected'])<=set(d['structural']): errors.append('structural-projection')
    if bool(set(d['unpin_fields'])&set(d['blocked_fields'])): errors.append('unpinned-field-move')
    if d['pinned'] and not d['unpin'] and d['replace']: errors.append('pin-replace')
    if d['pinned'] and d['destructor_move']: errors.append('pinned-destructor')
    if bool(set(d['projected'])&set(d['packed_fields'])): errors.append('packed-pin')
    if d['source_shared'] and d['unique_projection']: errors.append('shared-pin-uniqueness')
    if d['raw_origin']!=d['pin_origin']: errors.append('raw-pin-provenance')
    if d['unchecked_construct'] and not d['proof']: errors.append('unchecked-pin-proof')
    if d['pin_generation']>d['frame_generation']: errors.append('pin-relocation')
    return errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
base={'pinned': False, 'unpin': True, 'moves': [], 'projected': [], 'structural': [], 'unpin_fields': [], 'blocked_fields': [], 'replace': False, 'destructor_move': False, 'packed_fields': [], 'source_shared': False, 'unique_projection': False, 'raw_origin': None, 'pin_origin': None, 'unchecked_construct': False, 'proof': False, 'pin_generation': 0, 'frame_generation': 0}
check('well formed empty obligations',solve(base),[])
check('pinned-move regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'moves':['x']}))), ['pinned-move'])
check('pinned-move regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'moves':[N]}))), ['pinned-move'])
check('structural-projection regression 0', solve(dict(base, **({'projected':['a','b'],'structural':['a']}))), ['structural-projection'])
check('structural-projection regression 1', solve(dict(base, **({'projected':[N,N+1],'structural':[N]}))), ['structural-projection'])
check('unpinned-field-move regression 0', solve(dict(base, **({'unpin_fields':['a'],'blocked_fields':['a']}))), ['unpinned-field-move'])
check('unpinned-field-move regression 1', solve(dict(base, **({'unpin_fields':[N],'blocked_fields':[N]}))), ['unpinned-field-move'])
check('pin-replace regression 0', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True}))), ['pin-replace'])
check('pin-replace regression 1', solve(dict(base, **({'pinned':True,'unpin':False,'replace':True,'frame_generation':N,'pin_generation':N}))), ['pin-replace'])
check('pinned-destructor regression 0', solve(dict(base, **({'pinned':True,'destructor_move':True}))), ['pinned-destructor'])
check('pinned-destructor regression 1', solve(dict(base, **({'pinned':True,'destructor_move':True,'frame_generation':N,'pin_generation':N}))), ['pinned-destructor'])
check('packed-pin regression 0', solve(dict(base, **({'projected':['a'],'structural':['a'],'packed_fields':['a']}))), ['packed-pin'])
check('packed-pin regression 1', solve(dict(base, **({'projected':[N],'structural':[N],'packed_fields':[N]}))), ['packed-pin'])
check('shared-pin-uniqueness regression 0', solve(dict(base, **({'source_shared':True,'unique_projection':True}))), ['shared-pin-uniqueness'])
check('shared-pin-uniqueness regression 1', solve(dict(base, **({'source_shared':True,'unique_projection':True,'frame_generation':N,'pin_generation':N}))), ['shared-pin-uniqueness'])
check('raw-pin-provenance regression 0', solve(dict(base, **({'raw_origin':'b','pin_origin':'a'}))), ['raw-pin-provenance'])
check('raw-pin-provenance regression 1', solve(dict(base, **({'raw_origin':N+1,'pin_origin':N}))), ['raw-pin-provenance'])
check('unchecked-pin-proof regression 0', solve(dict(base, **({'unchecked_construct':True}))), ['unchecked-pin-proof'])
check('unchecked-pin-proof regression 1', solve(dict(base, **({'unchecked_construct':True,'frame_generation':N,'pin_generation':N}))), ['unchecked-pin-proof'])
check('pin-relocation regression 0', solve(dict(base, **({'pin_generation':N,'frame_generation':N+1}))), ['pin-relocation'])
check('pin-relocation regression 1', solve(dict(base, **({'pin_generation':N+1,'frame_generation':N+2}))), ['pin-relocation'])
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 pin proof survives relocation to a new frame generation.

Check a toy pin-aware ownership IR. Pinned non-Unpin values may not move; field projection requires structural pin declaration; unpinned fields remain movable; replace through pinned reference requires Unpin; pinned destructor cannot move receiver; packing disallows safe pinned field references; projecting through shared pointer cannot produce unique pinned reference; converting pin to raw keeps provenance; unchecked pin construction requires an explicit immovability proof; frame relocation invalidates an earlier pin proof. Input is a fully explicit descriptor of the stated toy IR. Return rule identifiers in declaration order; absent optional obligations use the provided neutral defaults. No rule is an assertion about a production language.

split: open-access