Iterator Element Ownership Protocol
6 sections
0%
Overview
Establish a uniform element ownership contract for the C iterator runtime protocol: every element yielded by IterState::next() is owned (+1 RC) by the consumer. Consumers dec after use; adapters that discard elements dec before discarding. This eliminates BUG-05-003 (leaked owned elements from map/flat_map adapters) and the broader class of borrow-vs-own ambiguity bugs across all 11 consumer functions, 11 adapter variants, and the AIMS analysis pipeline.
Planned
6 sections
Section 1 Not Started
Sources: Increment on Yield
0/18 tasks
0/18 tasks
Section 2 Not Started
Adapters: Decrement on Discard
0/23 tasks
0/23 tasks
Section 3 Not Started
Consumers: Decrement After Use
0/26 tasks
0/26 tasks
Section 4 Not Started
Codegen: Parameter Plumbing
0/30 tasks
0/30 tasks
Section 5 Not Started
AIMS: Owned Element Contract
0/22 tasks
0/22 tasks
Section 6 Not Started
Verification Matrix
0/31 tasks
0/31 tasks