Files
aji/docs/plan/phase-4-islands.md
T
dev 19dff5dd52 air: feature negotiation for AIR format 0 (DD-014)
- reference/air-features.md: normative feature registry (arrays,
  atomics, capabilities, channels, effects, islands, ownership, regions,
  sync, tasks; all reserved), dependency closures, reasons for E0006
- spec 07 §8.1/§8.5/§8.7: features are mandatory, validated before the
  body, full dependency closure declared, sorted canonically; every
  extension belongs to a feature; published feature semantics immutable
- spec 05 §8: features vs effects vs capabilities
- src/air/features.zig: registry, validation, sync test with the docs
- parser validates features first; E0006 carries `reason`
- `aji features` prints supported AIR format, language and features
- conformance: unknown, reserved and duplicate feature tests
- plan: feature publication tasks in phases 1-5
2026-10-04 12:49:29 +03:00

2.5 KiB
Raw Blame History

Phase 4 — Islands

Non-normative. Part of the implementation plan.

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 are proposed for acceptance (owner decision).

Blocking questions: none recorded; log new ones before starting.

Invariants

  • iref<T> 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<T> 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-1a todo Publish feature islands P4-1 reference/air-features.md, src/air/features.zig feature_not_declared / missing_dependency tests
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<T>; Share/Send derivation P4-3 verifier + interpreter concurrent reads of frozen graph accepted; mutable access rejected
P4-6 todo Arc<T> 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 island sections ready for the owner

Conformance tests to add

Negative corpus entry owned by this phase: island internal reference escape. Plus E2111, freeze-then-mutate, Arc of non-Share.