rfc: 0014 islands, frozen graphs and arc (Proposed); Phase 4 tasks made vertical

This commit is contained in:
dev committed 2026-10-05 21:47:02 +03:00
1 parent a18f149216
commit 7d8f147d1d
2 files changed
+336 -10

No files matched your search

+15 -10
View File
@@ -6,7 +6,9 @@ Non-normative. Part of the [implementation plan](README.md).
**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).
**Spec inputs:** spec 03 §12–15, 04 §13; [RFC 0014](../rfcs/0014-islands-frozen-arc.md) (Proposed) makes RFC 0001's island sections concrete. Implementation starts after the owner accepts it.
**Vertical rule (owner decision after P6A-9):** every feature goes through spec → AIR → verifier → interpreter → `.aji` lowering → Quick Reference → conformance (AIR and `.aji`) in this phase; nothing is left for a later frontend phase.
**Blocking questions:** none recorded; log new ones before starting.
@@ -22,15 +24,18 @@ Non-normative. Part of the [implementation plan](README.md).
| 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 |
| P4-0 | doing | RFC 0014: decisions D1–D10, owner review | — | `docs/rfcs/0014-islands-frozen-arc.md` | Accepted |
| P4-1 | todo | 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` (dependencies per D10) and add `arc` | 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>` | P4-5 | verifier + interpreter | non-`Share` rejected (`E4002`); 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-10 | todo | Phase exit review | all | plan status | exit criterion passes |
## Conformance tests to add