Class OwnershipPathVerifier
- All Implemented Interfaces:
Function<IRConstruct, List<String>>
It tracks OBLIGATIONS: an OWNED value (ValueKind.madeBy(IRInstr), or OWN v) is one, discharged by exactly
one consumer - DROP, DROP_AT_EXIT (handed to a region, which drops it at every exit, unwind
included), a [consume] assignment, an owned call argument, THROW, a forwarding CAST (the
obligation moves to the cast). Slots are their owners' (V-G), so they carry none.
Paths, compositionally (design §3): every nested list of a composite is CLOSED - what it makes it discharges, and
it discharges nothing it was given. Flat branches inside a list are followed label by label, the state compared at
every join and required empty at every RETURN. At every call - every call may throw until the effect summary
exists - each live obligation must already be covered (handed to a region), or it leaks on that call's unwind edge.
The throw sites outside a CALL are exits too (M3, 2026-11-12; OWNERSHIP §7): a CANCEL_POINT throws
Cancelled natively (ek9_cancel_point), and a DICT_LITERAL runs the key type's #? and
== through the runtime's _addAss - user code that may throw. THROW ends its path.
Enforced (design §4, step 3): IR_ANALYSIS fails a compile on any finding, as it does for OwnershipVerifier.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(IRConstruct construct) The per-path findings of every operation of a construct, as"operation: problem"; empty when every path of every operation keeps V-A.The per-path findings of one operation body.
-
Constructor Details
-
OwnershipPathVerifier
public OwnershipPathVerifier()
-
-
Method Details
-
apply
The per-path findings of every operation of a construct, as"operation: problem"; empty when every path of every operation keeps V-A.- Specified by:
applyin interfaceFunction<IRConstruct, List<String>>
-
check
-