Shared-object representation in a monotone arena #
The opt-in arena convention reserves address zero for a shared allocation
cursor. Every represented word's address is positive and below that cursor,
including storage for immutable-node payloads, tags and tail addresses.
Holes and empty objects are allowed. The fixed heapLimit separates heap and
stack. Existing HeapRep clients acquire no new restriction.
Reservation retains the old source heap until the fresh region is initialized. These memory-frame rules assert neither a completed allocation nor its cost.
Transport heap representation using equality only on actual object words. Unrepresented memory, registers and input/output may differ.
Complete objects below a shared bump cursor. This measures reserved extent, not compact storage, reclaimable space or reachable live data.
- heapRep : HeapRep placement heapLimit heap target
- storedReserved {id : ℕ} {object : Complexity.Language.HeapObject} : heap.objects[id]? = some object → ∀ index < (heapObjectWords placement object).size, 0 < BitVec.toNat (arrayAddr (placement id) index) ∧ BitVec.toNat (arrayAddr (placement id) index) < next
Instances For
The original scalar-array reservation rule follows from reservation of every word in both object kinds.
The cursor is observed exactly, without modular reduction.
No represented word, including a node field, occupies the metadata cell.
Fresh arena addresses are disjoint from every old object word.
Existing object cells never denote the metadata cell.
Addresses at or above the old cursor cannot alias any old object cell.
A frame on the positive reserved prefix transports all old objects. The new cursor and its capacity remain explicit and independent of that frame.
Updating metadata reserves space but does not pretend to initialize it.
An initialization store at a fresh address preserves every old object.