Phase 4: islands, frozen graphs and arc through every layer (RFC 0014)

AIR: types island<T>, frozen<T>, arc<T>, iref<T>; 16 instructions
(island.create/alloc/root/borrow/freeze/destroy, frozen.root/borrow/
release, arc.from_frozen/new/clone/release/root/borrow, iref.eq); features
islands (depends on heap) and arc (depends on islands) published.
Verifier: IslandSafe/ArcSafe (E2111 at the owner type), container child
borrows (one mut access per island), Send/Share rows (island not Share),
linear owners, mem.alloc effect, element rules (recursion through iref).
Interpreter: graphs with never-reused identities, T0010 for a foreign
iref, O(1) freeze/conversion/transfer, arc counts in a trace hook
(Options.arc_events), budgets per the quota table, collector support.
.aji layer 9: types, operations, island.at/frozen.at/arc.at as borrow
places with explicit container borrows, iref ==/!=.
Frontend fix: joins carry only variables the construct assigns (and that
are read again), so an unchanged linear value is never a block argument
while borrowed.

Tests: 10 AIR (phase4), 6 .aji run + 12 rejects (layer9), the reference
program island-pipeline in .aji, equivalent to an independently
hand-written AIR program (36 on 30 schedule seeds); unit tests for the
arc count trace and O(1) transfer. Quick Reference §7 graphs (checked
excerpt of quickref/graphs.aji); coverage 61/61. Bundle growth: AIR
+7.0%, Quick Reference +0.6k, source docs +4.2k (recorded).
Spec: quota rows match the header-reserved count; idioms and iref
recursion in spec 03 §22; P4-11 (air-text.ebnf gaps) recorded.
This commit is contained in:
dev committed 2026-10-05 22:14:05 +03:00
1 parent ca84ab4348
commit c699529fec
58 files changed
+2189 -98

No files matched your search

+3 -2
View File
@@ -47,6 +47,7 @@ Growth never blocks a merge automatically; a complex feature can be justified, b
| RFC 0012 waits, channels, select, mutex | 19 | 38 | 133 781 | 20 748 | 35 119 (+15.8 %) | 35 219 (+15.7 %) | 36 238 (+15.7 %) |
| Phase 3 implementation | 19 | 38 | 134 576 | 20 884 | 35 324 (+0.6 %) | 35 424 (+0.6 %) | 36 453 (+0.6 %) |
| RFC 0014 islands, frozen graphs, arc (Phase 4) | 19 | 41 | 142 918 | 22 212 | 37 785 (+7.0 %) | — | — |
RFC 0011 crossed the 10 % warning line (its own estimate said "below 10 %"): four new sections in spec 04 (tasks, loans, `Send`/`Share` table, scheduler). Below the 20 % review threshold. RFC 0012 (+15.8 %, estimate 12–16 %): five sections in spec 04 (waits and cancellation, channels, select, mutex, critical-section rule). Implementation-time spec corrections (mutex linearity, `mutex.take` rules): +0.6 %. Phase 3 total since the Phase 2 baseline: +29.2 %. Next measurement: after the E-S smoke test, or with the next RFC.
@@ -56,11 +57,11 @@ The `.aji` condition does not get the AIR bundle as its documentation. It gets a
| Path | Contents | cl100k tokens |
|---|---|---:|
| `QUICK.md` | the Quick Reference, then a table of which file to open for what | ~4.4k |
| `QUICK.md` | the Quick Reference, then a table of which file to open for what | ~5.0k (Phase 4: +0.6k for §7 graphs) |
| `language/syntax.md` | grammar, spec 15 §1, §2, §4–§6 | ~5.4k |
| `language/types.md` | spec 15 §3, integer semantics, type properties, traps | ~1.0k |
| `language/ownership.md` | spec 15 §9, aliasing, borrow lifetime, stack storage, slices, initialization (spec 03) | ~1.0k |
| `language/memory.md` | `Own<T>`, regions, allocation authority (spec 03) | ~1.4k |
| `language/memory.md` | `Own<T>`, regions, islands, frozen graphs, arc, allocation authority (spec 03) | ~3.6k |
| `language/effects-capabilities.md` | spec 05 §2–§5, §9–§10, effect and capability registries | ~4.4k |
| `language/io-resources.md` | spec 15 §8, spec 06 §1–§3, §7, intrinsic registry | ~3.0k |
| `language/concurrency.md` | implementation status, spec 15 §7, `Send`/`Share`, scheduler | ~2.2k |
+3
View File
@@ -59,6 +59,9 @@ docs/spec/06-resources-and-errors.md :: ## 7. I/O errors
docs/spec/03-memory-model.md :: ## 18. Allocation authority in AIR
docs/spec/03-memory-model.md :: ## 19. Heap in AIR
docs/spec/03-memory-model.md :: ## 20. Regions in AIR
docs/spec/03-memory-model.md :: ## 22. Islands in AIR
docs/spec/03-memory-model.md :: ## 23. Frozen graphs in AIR
docs/spec/03-memory-model.md :: ## 24. Arc in AIR
# Unsafe boundaries
docs/spec/13-contracts-and-unsafe.md :: ## 6. Unsafe code in AIR
+16
View File
@@ -62,5 +62,21 @@
"o200k_base": 35424,
"qwen2.5": 36453
}
},
{
"label": "RFC 0014 islands, frozen graphs, arc (Phase 4)",
"language": "aji",
"air": 0,
"phase": 3,
"files": 19,
"sections": 41,
"bytes": 142918,
"lines": 2118,
"words": 22212,
"tokens": {
"cl100k_base": 37785,
"o200k_base": 37888,
"qwen2.5": 38988
}
}
]
+46 -3
View File
@@ -37,7 +37,8 @@ effects [io.read, io.write]
| `own<T>`, `own_array<T>`, `region` | heap and regions (§6) |
| `cap<K>` | authority; kinds below |
| `file<read>`, `file<write>`, `file<append>`, `listener`, `stream` | linear resources |
| `task<T>`, `sender<T>`, `receiver<T>`, `mutex<T>` | concurrency (§7) |
| `island<T>`, `frozen<T>`, `arc<T>`, `iref<T>` | object graphs (§7) |
| `task<T>`, `sender<T>`, `receiver<T>`, `mutex<T>` | concurrency (§8) |
| `io_error`, `alloc_error`, `cap_error` | built-in error enums |
**Linear** values (resources, `own`, `region`, `task`, endpoints, `mutex`) are consumed exactly once. Everything else that is a plain value is copyable.
@@ -152,7 +153,47 @@ region.reset(r);
- Resource operands (`f`, `s`, `l`, endpoints) are borrowed automatically for an operation; a region is not (bind `ref arena = r;`); data borrows (`mut buf`, `ref bytes`) are always written.
- Memory budgets count live bytes, so freeing returns them. In the deterministic profile `mem.alloc` needs a grant with a budget: `--grant heap=mem.alloc:4096`.
## 7. Concurrency
## 7. Graphs: island → frozen → arc
Choose by intent:
- change a graph → `island<T>`;
- read it in parallel → `frozen<T>`;
- give it several independent owners → `arc<T>`.
Objects are addressed by `iref<T>` handles: copyable, compared only with `==`/`!=`, cycles allowed. A graph holds only plain data and irefs (`E2111` otherwise).
```aji
let isl = island.create(Node { value: 1, next: Link::End }, heap) or trap; // effect mem.alloc
{
mut g = isl; // borrow the island; it outlives the accesses
let a = island.root(g);
let b = island.alloc(g, Node { value: 2, next: Link::To(a) }) or trap;
mut first = island.at(g, a); // mut<Node>; one mutable access at a time
first.next = Link::To(b); // edges may form cycles
}
let f = island.freeze(move isl); // O(1), irreversible; irefs stay valid
…
ref fr = f; // frozen graphs are Share: lend fr to tasks
let a = frozen.root(fr);
…
let shared = arc.from_frozen(move f); // O(1); the same graph
let other = arc.clone(shared); // count + 1
arc.release(move other); // the last release frees the graph
```
- `island.at`, `frozen.at` and `arc.at` appear only as `ref x = …;`/`mut x = …;`, with a **named borrow of the owner** (`mut g = isl;`, `ref fr = f;`), as for regions. `frozen.at` and `arc.at` give `ref` only.
- An `iref` from another graph traps `T0010`.
- Ownership:
- an island is `Send`, not `Share`: move it through channels or spawn, or freeze it to share;
- `frozen` and `arc` are `Send` and `Share`.
- Every owner is consumed once:
- an island by `island.destroy(move i)` or `island.freeze`;
- a frozen graph by `frozen.release` or `arc.from_frozen`;
- each arc handle by `arc.release`.
- `create`, `alloc` and `arc.new` charge the `mem.alloc` budget. The bytes come back when the graph is freed.
## 8. Concurrency
Tasks, channels, `select`, `lock`/mutex, `shield` and the cancellation operations all work.
@@ -222,7 +263,7 @@ scope s { // every task spawned in s must
Inside a `lock` block no operation may wait or spawn, and no function may be called whose effects include `task.wait` or `task.spawn` (`E4304`). One lock at a time, so lock-order deadlocks cannot happen.
## 8. Common diagnostics → repair
## 9. Common diagnostics → repair
| Code | Meaning | Usual repair |
|---|---|---|
@@ -242,4 +283,6 @@ scope s { // every task spawned in s must
| E4101 | data race with a task | lend disjoint parts (`split_at`, fields) or join first |
| E4301 | task not joined at scope end | `task.join(move t)` before the `scope` block ends |
| E4304 | wait inside `lock` | move the wait out of the `lock` block |
| E2111 | graph content not plain data | store only integers, booleans, enums, structs/arrays of them and `iref`s in a graph |
| T0010 | `iref` of another graph | use a handle with the graph it came from |
| T0001–T0009 | runtime trap | see `kind` and `source_location` |
+7 -1
View File
@@ -9,7 +9,7 @@
> QUICK.md
docs/agent/quick-reference.md
docs/agent/source-notes.md :: ## 9. Where to read more
docs/agent/source-notes.md :: ## 10. Where to read more
> language/syntax.md
docs/reference/grammar.ebnf
@@ -37,6 +37,12 @@ docs/spec/03-memory-model.md :: ## 10. Initialization policy
docs/spec/03-memory-model.md :: ## 7. Own<T>
docs/spec/03-memory-model.md :: ## 8. Regions
docs/spec/03-memory-model.md :: ## 18. Allocation authority in AIR
docs/spec/03-memory-model.md :: ## 12. Island<T>
docs/spec/03-memory-model.md :: ## 13. Frozen<T>
docs/spec/03-memory-model.md :: ## 14. Arc<T>
docs/spec/03-memory-model.md :: ## 22. Islands in AIR
docs/spec/03-memory-model.md :: ## 23. Frozen graphs in AIR
docs/spec/03-memory-model.md :: ## 24. Arc in AIR
> language/effects-capabilities.md
docs/spec/05-effects-and-capabilities.md :: ## 2. Effects
+2 -2
View File
@@ -2,7 +2,7 @@
Text that exists only for the Source Reference Bundle (`source-bundle.txt`). Non-normative: it points at the normative files and states which source layers are implemented.
## 9. Where to read more
## 10. Where to read more
The other files in `/docs` hold the full rules. Open one only when this page is not enough.
@@ -11,7 +11,7 @@ The other files in `/docs` hold the full rules. Open one only when this page is
| exact syntax, every construct, `match` and outcomes | `/docs/language/syntax.md` |
| integer semantics, conversions, Copy/Send/Share, traps | `/docs/language/types.md` |
| borrows, scopes, frame storage, slices, initialization | `/docs/language/ownership.md` |
| `own`, regions, allocation budgets | `/docs/language/memory.md` |
| `own`, regions, islands, frozen graphs, arcs, allocation budgets | `/docs/language/memory.md` |
| effects, capabilities, grants, narrowing | `/docs/language/effects-capabilities.md` |
| files, streams, stdin/stdout, intrinsic operand tables, `io_error` | `/docs/language/io-resources.md` |
| tasks, channels, select, mutex, cancellation | `/docs/language/concurrency.md` |
+10 -9
View File
@@ -26,15 +26,16 @@ Non-normative. Part of the [implementation plan](README.md).
|---|---|---|---|---|---|
| P4-0 | done | RFC 0014: decisions D1–D10, owner review | — | `docs/rfcs/0014-islands-frozen-arc.md` | Accepted (revision 2) |
| P4-1 | done | Spec integration: spec 03 §12–14, 04 §13/§35/§38.1, 07a contract tables, 15 (layer 9), error codes (`T0010`) | P4-0 | spec, reference | contract tables complete (spec 07 §4 fields) |
| P4-1a | todo | Publish `islands` (depends on `heap`) and add `arc` (depends on `islands`) | P4-1 | `reference/air-features.md`, `src/air/features.zig` | feature_not_declared / missing_dependency tests |
| P4-2 | todo | Interpreter: island tables, identities never reused, `T0010`, freeze, O(1) transfer; arc counts in the trace; collector support | P4-1 | `src/interp/` | transfer cost independent of graph size (unit test with an instruction-count bound); `--collect-every-step` passes |
| P4-3 | todo | Verifier: types and classes, storability (`E2111`), container child borrows, arc rules (`E4002`/`E1001`), Send/Share rows | P4-1 | `src/verifier/` | accept/reject per rule |
| P4-4 | todo | Transfer through channels and spawn; sender invalidation | P4-3 | verifier + interpreter | use after send rejected (`E2001`); schedule stress |
| P4-5 | todo | Freeze and `frozen<T>`; lending to tasks | P4-3 | verifier + interpreter | concurrent reads accepted; mutable access rejected |
| P4-6 | todo | `arc<T>`: `arc.from_frozen`, `arc.new` (`ArcSafe`), `clone`, `release`, `root`, `borrow` | P4-5 | verifier + interpreter | non-`ArcSafe` rejected (`E2111`); count changes visible in the trace |
| P4-7 | todo | `.aji` layer 9: types, operations, `island.at`/`frozen.at`/`arc.at` places, explicit container borrows; Quick Reference section; source coverage rows | P4-3 | `src/frontend/`, `docs/agent/` | `.aji` run/reject tests; Quick Reference examples checked; `tools/source_coverage.py` passes |
| P4-8 | todo | Reference program `island-pipeline` in AIR and `.aji` with equivalence | P4-4, P4-5, P4-6, P4-7 | `tests/conformance/` | passes under all P3 stress modes |
| P4-9 | todo | Complexity budget: AIR bundle, Quick Reference, Source Reference Bundle measured against the RFC estimate | P4-7 | `docs/agent/README.md` | growth recorded and justified |
| P4-1a | done | Publish `islands` (depends on `heap`) and add `arc` (depends on `islands`) | P4-1 | `reference/air-features.md`, `src/air/features.zig` | feature_not_declared / missing_dependency tests |
| P4-2 | done | Interpreter: island tables, identities never reused, `T0010`, freeze, O(1) transfer; arc counts in the trace; collector support | P4-1 | `src/interp/` | transfer cost independent of graph size (unit test with an instruction-count bound); `--collect-every-step` passes |
| P4-3 | done | Verifier: types and classes, storability (`E2111`), container child borrows, arc rules (`E4002`/`E1001`), Send/Share rows | P4-1 | `src/verifier/` | accept/reject per rule |
| P4-4 | done | Transfer through channels and spawn; sender invalidation | P4-3 | verifier + interpreter | use after send rejected (`E2001`); schedule stress |
| P4-5 | done | Freeze and `frozen<T>`; lending to tasks | P4-3 | verifier + interpreter | concurrent reads accepted; mutable access rejected |
| P4-6 | done | `arc<T>`: `arc.from_frozen`, `arc.new` (`ArcSafe`), `clone`, `release`, `root`, `borrow` | P4-5 | verifier + interpreter | non-`ArcSafe` rejected (`E2111`); count changes visible in the trace |
| P4-7 | done | `.aji` layer 9: types, operations, `island.at`/`frozen.at`/`arc.at` places, explicit container borrows; Quick Reference section; source coverage rows | P4-3 | `src/frontend/`, `docs/agent/` | `.aji` run/reject tests; Quick Reference examples checked; `tools/source_coverage.py` passes |
| P4-8 | done | Reference program `island-pipeline` in AIR and `.aji` with equivalence | P4-4, P4-5, P4-6, P4-7 | `tests/conformance/` | passes under all P3 stress modes |
| P4-9 | done | Complexity budget: AIR bundle, Quick Reference, Source Reference Bundle measured against the RFC estimate | P4-7 | `docs/agent/README.md` | growth recorded and justified |
| P4-11 | todo | `reference/air-text.ebnf` covers the syntax of Phases 2–4: `cap<K>`, endpoint, task, graph and built-in types; `own.*`, `task.*`, `channel.*` (with the type operand of `channel.make`), `island.*`/`frozen.*`/`arc.*`/`iref.eq`; the multi-edge terminator forms (found by the independent author of `program_island_pipeline.air`) | — | `docs/reference/air-text.ebnf` | every instruction of spec 07a and spec 03 §22–§24 has a production |
| P4-10 | todo | Phase exit review | all | plan status | exit criterion passes |
## Conformance tests to add
+2 -1
View File
@@ -30,6 +30,7 @@ Declaring `features [capabilities, effects, ownership]` grants no authority. It
| Feature | Status | Phase | Depends on | Semantic block |
|---|---|---|---|---|
| `arc` | published | 4 | `capabilities`, `effects`, `heap`, `islands`, `ownership`, `resources` | `arc<T>`, `arc.*`, `ArcSafe` (spec 03 §24) |
| `arrays` | published | 1 | `ownership` | `array<T, N>`, `slice<T>`, `slice_mut<T>`, `array.splat`, `borrow.index[.proven]`, `slice.*`, `guard`, bounds facts (spec 07a, spec 08 §12) |
| `atomics` | reserved | 5 | `ownership` | atomic types, the five orderings, fences, `atomic.*` instructions |
| `borrow_joins` | reserved | — | `ownership` | borrow-typed block parameters (spec 08 §11.6); unscheduled |
@@ -40,7 +41,7 @@ Declaring `features [capabilities, effects, ownership]` grants no authority. It
| `effects` | published | 2 | — | flat effect checking of `effects [...]` for `call` and `intrinsic` (E3101, spec 05 §9) |
| `guard_transfer` | reserved | — | `cancellation`, `effects`, `ownership`, `sync`, `tasks` | `guard<T>` as parameter, return type or aggregate member; unscheduled |
| `heap` | published | 2 | `capabilities`, `effects`, `ownership`, `resources` | `own<T>`, `own_array<T>`, `own.*`, built-in `alloc_error`, `mem.alloc` budgets and `budget` narrowing (spec 03 §18–§19) |
| `islands` | reserved | 4 | `capabilities`, `effects`, `heap`, `ownership`, `regions`, `resources` | `Island<T>`, `iref<T>`, transfer, freeze, `Frozen<T>` |
| `islands` | published | 4 | `capabilities`, `effects`, `heap`, `ownership`, `resources` | `island<T>`, `frozen<T>`, `iref<T>`, `island.*`, `frozen.*`, `iref.eq`, `IslandSafe`, `T0010` (spec 03 §22–§23) |
| `linear_aggregates` | reserved | — | `capabilities`, `effects`, `ownership`, `resources` | resource types as struct fields, enum payloads and array elements; unscheduled |
| `ownership` | published | 1 | — | frame storage `local<T>`, second-class borrows `ref<T>`/`mut<T>`, `from` returns, initialization (spec 07 §8.8, spec 07a, spec 08 §11, §13) |
| `receiver_dup` | reserved | — | `cancellation`, `capabilities`, `channels`, `effects`, `heap`, `ownership`, `resources`, `tasks` | several receivers of one channel (MPMC); unscheduled |
+5 -4
View File
@@ -104,13 +104,14 @@ A graph charges the `cap<mem.alloc>` it was created with: live bytes, as for `ow
| Operation | Live bytes |
|---|---|
| `island.create`, `island.alloc` | + the object |
| `island.create` | + the root object and the graph header (16 bytes, with room for an `arc` count) |
| `island.alloc` | + the object |
| `island.freeze` | unchanged |
| `arc.new` | + the value and the count |
| `arc.from_frozen` | + the count only |
| `arc.new` | + the value and the graph header |
| `arc.from_frozen` | unchanged (the header has room for the count) |
| `arc.clone` | unchanged |
| `arc.release`, not the last | unchanged |
| `arc.release`, the last | − the graph and the count |
| `arc.release`, the last | − the graph |
| `frozen.release` | − the graph |
| `island.destroy` | − the graph |
+23 -5
View File
@@ -386,6 +386,23 @@ Graph owners may be parameters, returns, block arguments, channel elements and m
Objects are never freed one by one. Two irefs naming different objects are not treated as disjoint: a mutable access is exclusive for the whole island.
**Types may recurse through `iref`.** `@Node = struct { value: u64, next: @Link }` with `@Link = enum { End, To(iref<@Node>) }` is well formed, whatever the declaration order: an `iref<T>` holds no `T`.
**Idioms.** Accesses are ordinary borrows, ended before the container borrow:
```text
; write a field of an object ; read an object of a frozen graph
%g = borrow.mut %isl %fb = borrow.ref %f
%n = island.borrow %g, %r ; mut<@Node> %p = frozen.borrow %fb, %r ; ref<@Node>
%nf = borrow.field @Node.next, %n %v = load %p
store %nf, %link borrow.end %p
borrow.end %nf borrow.end %fb
borrow.end %n
borrow.end %g
```
The container borrow may stay live across the edges of `island.alloc`, like any borrow (SSA dominance). A trap may leave graph owners unconsumed: the execution ends (spec 04 §33.2). `arc.clone` only reads its `ref<arc<T>>`, which may end right after the clone while the new handle lives on.
## 23. Frozen graphs in AIR (feature `islands`)
`frozen<T>`: a graph owner; linear; `Send`, `Share`. There is no thaw.
@@ -404,7 +421,7 @@ Decision record: RFC 0014. Depends on `islands`.
| Instruction | Operands → result | Ownership and memory | Effect | Verifier | Runtime |
|---|---|---|---|---|---|
| `%a = arc.from_frozen %f` | `frozen<T>` (consumed) → `arc<T>` | same storage and identity; count 1; charges the count | — | — | O(1) |
| `%a = arc.from_frozen %f` | `frozen<T>` (consumed) → `arc<T>` | same storage and identity; count 1; no charge (the graph header has room for the count) | — | — | O(1); never fails |
| `arc.new %v, %mem, ok -> @ok, err -> @err` (terminator) | `T` (consumed), `cap<mem.alloc>`; `@ok(arc<T>)`, `@err(alloc_error)` | a one-object graph; count 1 | `mem.alloc` | `T: ArcSafe` (`E2111`) | — |
| `%a2 = arc.clone %ar` | `ref<arc<T>>` → `arc<T>` | count + 1 | — | — | synchronized by the runtime |
| `arc.release %a` | `arc<T>` (consumed) | count − 1; the last release frees the graph and the count | — | — | synchronized; never fails |
@@ -417,13 +434,14 @@ The count is not a user atomic: no memory ordering is chosen by the program. Eac
| Operation | Live bytes |
|---|---|
| `island.create`, `island.alloc` | + the object |
| `island.create` | + the root object and the graph header (16 bytes, with room for an `arc` count) |
| `island.alloc` | + the object |
| `island.freeze` | unchanged |
| `arc.new` | + the value and the count |
| `arc.from_frozen` | + the count |
| `arc.new` | + the value and the graph header |
| `arc.from_frozen` | unchanged (the header has room for the count) |
| `arc.clone` | unchanged |
| `arc.release`, not the last | unchanged |
| `arc.release`, the last | − the graph and the count |
| `arc.release`, the last | − the graph |
| `frozen.release` | − the graph |
| `island.destroy` | − the graph |
+6 -1
View File
@@ -106,7 +106,12 @@ Statements end with `;`. Block constructs (`if`, `while`, `for`, `loop`, `match`
`if` and `match` are expressions when every branch yields a value of the same type through a tail expression (an expression without `;` at the end of a block) or diverges (`return`, `break`, `continue`, `trap`).
**Joins carry live variables only.** A variable is passed to a join (the block after an `if` or `match`, a loop header, a loop exit) only if it may be read after that join: on a later path, or, for a loop header, anywhere in the loop. A variable that is not read again is not passed on. This is ordinary pruned SSA construction, not tracking of moves. A linear value consumed before a join (`channel.close_receiver(move r)` before `break`) does not travel to it. A linear value that is read after it was consumed is still the verifier's `E2001`. The analysis is conservative: any read on a later path counts, and only a whole-variable assignment in straight-line code ends a variable's life.
**Joins carry only variables that change and are read again.** A variable is passed to a join (the block after an `if`, `match`, `lock` or `select`, a loop header, a loop exit) only if two things hold:
- the construct assigns it, by `x = e;` or by rebinding on an outcome edge;
- it may be read after the join: on a later path, or, for a loop header, anywhere in the loop.
Any other variable keeps its dominating value. An unchanged linear value is therefore never passed as a block argument while it is borrowed (`mut g = isl;` around a loop), and a variable that is not read again is not passed on. This is ordinary pruned SSA construction, not tracking of moves. A linear value consumed before a join (`channel.close_receiver(move r)` before `break`) does not travel to it. A linear value that is read after it was consumed is still the verifier's `E2001`. The analysis is conservative: any read on a later path counts, and only a whole-variable assignment in straight-line code ends a variable's life.
**Type inference is deliberately small.** It works within one function, it is monomorphic, and it does no overload resolution or search among several admissible types. An expression's type comes from: