# Phase 4 — Islands Non-normative. Part of the [implementation plan](README.md). **Goal:** uniquely owned closed mutable graphs that move between tasks in O(1), and irreversible freezing into shareable immutable graphs. **Exit criterion:** a cyclic graph moves between tasks with no deep copy and no shared mutation (`island-pipeline` reference program). **Spec inputs:** spec 03 §12–15, 04 §13; RFC 0001 island sections move to Accepted. **Blocking questions:** none recorded; log new ones before starting. ## Invariants - `iref` points only inside its own island and is never dereferenced without access to the owning island; - an island has no edges into foreign mutable memory; - after transfer the sender holds nothing that reaches the island; - a `Frozen` never yields a mutable reference in safe code; - reference counts change only through explicit `arc.clone` / `arc.release`. ## Tasks | ID | Status | Task | Depends | Output | Done when | |---|---|---|---|---|---| | P4-1 | todo | Contract tables: `island.create`, `island.alloc`, `island.freeze`, `iref` access, `arc.clone`, `arc.release` | — | spec 07 appendix | all spec 07 §4 fields present | | P4-2 | todo | Island allocator in the interpreter (private regions, O(1) transfer) | P4-1 | `src/interp/memory.zig` | transfer cost independent of graph size (unit benchmark with fixed bound) | | P4-3 | todo | `iref` verifier and closure checks | P4-1 | `src/verifier/island.zig` | E2110, E2111 accept/reject | | P4-4 | todo | Island transfer through channels and task spawn; sender invalidation | P4-3 | verifier + interpreter | sender use after send rejected (E2001) | | P4-5 | todo | Freeze and `Frozen`; Share/Send derivation | P4-3 | verifier + interpreter | concurrent reads of frozen graph accepted; mutable access rejected | | P4-6 | todo | `Arc` for `Share` values | P4-5 | verifier + interpreter | `Arc` of non-`Share` rejected (E4002); count changes visible in trace | | P4-7 | todo | Reference program: island-pipeline | P4-4, P4-5 | `tests/programs/island-pipeline/` | passes under all P3 stress modes | | P4-8 | todo | Phase exit review | all | plan status, RFC 0001 | exit criterion passes; RFC 0001 fully Accepted | ## Conformance tests to add Negative corpus entry owned by this phase: island internal reference escape. Plus E2111, freeze-then-mutate, `Arc` of non-`Share`.