Existing object roots in source values and environments #
Rootedness only says that a buffer or node reference's object identifier denotes an existing slot. It imposes no stored type, extent, scalar-range or separation condition. A rooted node reference need not denote a correctly typed node or a valid list; preserving a reachable chain additionally needs its contents and the heap's link invariant. Rooted buffers may likewise fail a heap access. Scalars carry no roots. Products retain both fields' roots, and options retain roots only in an actual payload. These source predicates contain no machine addresses or runtime metadata.
A node reference names an existing object slot. This does not assert a successful typed node lookup, valid tail or finite linked-list contents.
Instances For
Heap shape growth preserves the referenced identity, even when its stored kind is invalid. No claim about its reachable tail follows from rootedness.
Every object identifier carried by a source value already exists.
Equations
- Complexity.Language.ValueRooted heap x_2 = True
- Complexity.Language.ValueRooted heap x_2 = True
- Complexity.Language.ValueRooted heap x_2 = True
- Complexity.Language.ValueRooted heap buffer = Complexity.Language.Buffer.Rooted buffer heap
- Complexity.Language.ValueRooted heap ref = Complexity.Language.NodeRef.Rooted ref heap
- Complexity.Language.ValueRooted heap value = (Complexity.Language.ValueRooted heap value.1 ∧ Complexity.Language.ValueRooted heap value.2)
- Complexity.Language.ValueRooted heap none = True
- Complexity.Language.ValueRooted heap (some value_1) = Complexity.Language.ValueRooted heap value_1
Instances For
Heap growth preserves the object roots of a retained source value.
All object references carried by bindings name existing object slots.
Equations
- env.Rooted heap = ∀ {τ : Complexity.Language.Ty} (v : Complexity.Language.Var Γ τ), Complexity.Language.ValueRooted heap (env.get v)
Instances For
An empty environment retains no object roots.
Heap growth also preserves suspended callers' source environments.
Shared object cells are scalars and cannot introduce an object root.
A successful relative slice keeps the original object identifier, even when that object's scalar type or the resulting view extent is invalid.