Class OwnershipBorrowVerifier
- All Implemented Interfaces:
Function<IRConstruct, List<String>>
- A local borrow -
t = LOAD x- is valid until the nextSLOT_ASSIGN x/STORE xon the path, or the exit of x's owner region. A call does not end it: EK9 has no address-of. - A heap borrow -
LOAD_FIELD,LOAD_STATIC_FIELD, a capture read - must beOWNed before any call, field or static store, or chain merge: another method may reassign the field, and releasing its old value frees what the borrow points at.purelicenses nothing::=?is legal in a pure scope on any object, and a FIELD_ASSIGN releases the old value.
Paths, with "the borrow ended" a MAY fact: the union over flat branches at a label; a chain as it runs (each condition in turn, an arm's body after its own condition, a try's handlers from anywhere in its body); a loop's iteration walked twice, so a borrow ended late in one iteration is seen ended at a use early in the next; any other composite's list may or may not run, and the values it defines take their state from running it alone.
ENFORCED (design §6): IR_ANALYSIS fails a compile on any finding, as it does for OwnershipPathVerifier.
It was measured report-only first over every corpus (703 findings over the codegen fixtures, to 0). Each finding
starts with a shape tag - (V-I heap-call ...), (V-I use-after ...),
(V-I merge) - carrying the callee's kind and declared purity, so the corpus measurement can group them
(Steve, 2026-10-28: measure every refinement, assume none). Two are made, each measured and argued: a field of a
RAW form (an enum's _ordinal) holds no count, so loading it borrows nothing; and a call that runs no EK9
code (RunsNoEk9Code) can neither reassign a field nor release a value.
-
Constructor Details
-
OwnershipBorrowVerifier
public OwnershipBorrowVerifier()
-
-
Method Details
-
apply
The V-I findings of every operation of a construct, as"operation: problem".- Specified by:
applyin interfaceFunction<IRConstruct, List<String>>
-
check
-