spec: single normative source, accept RFC 0004, freeze AIR format 0, fuel
Owner decisions after the Phase 0 review: - precedence: docs/spec/ is the single normative source; RFCs are decision records whose accepted rules are integrated into the spec in the same change (AGENTS.md, docs/README.md, rfcs/README.md, DD-011) - RFC 0004 Accepted (scope: AIR format 0, language 0.1) - AIR format 0 frozen as the semantic baseline; spec 07 §8.7 defines the only permitted additive changes, everything else needs `air 1` (DD-012) - Q-019 resolved: deterministic instruction fuel (spec 11 §7). Outcome `limit_exceeded` is a runner outcome, not a trap; `aji run --fuel N`, exit code 5; conformance runs always use fuel (default 1 000 000, `fuel:` header); fuel/schedule budget/quantum kept separate for P3 (DD-013)
This commit is contained in:
1 parent
dc36b5cfc0
commit
03dda1245a
24 files changed
+268
-63
No files matched your search
+2
-2
@@ -76,7 +76,7 @@ These run through all phases rather than belonging to one.
|
||||
|
||||
| Track | Rule |
|
||||
|---|---|
|
||||
| Spec | Each phase's first tasks update `../spec/` and the open-questions log. RFCs 0001–0004 move to Accepted in the phase that implements them (P1, P3, P5, P0 respectively). |
|
||||
| Spec | Each phase's first tasks update `../spec/` and the open-questions log. RFCs are proposed for acceptance in the phase that implements them (0001 in P1, 0002 in P3, 0003 in P5; 0004 was accepted after P0); acceptance integrates their rules into the spec in the same change. New constructs extend format 0 only under spec 07 §8.7. |
|
||||
| Diagnostics | New codes are added to `../reference/error-codes.md` and `src/diag.zig` together; structured fields per code are documented in the spec section that defines the rule. |
|
||||
| Determinism | Every run test is executed twice and compared from P0-12 on; concurrency tests add schedule stress from P3. |
|
||||
| Audit reports | Each phase that adds an auditable fact (unsafe sites, effects, capabilities, weak atomics, eliminated checks) extends the report in `src/report/` (spec 10 §6, spec 13 §5). |
|
||||
@@ -93,6 +93,6 @@ These run through all phases rather than belonging to one.
|
||||
|
||||
| Phase | Status |
|
||||
|---|---|
|
||||
| P0 | done (exit review in the phase file) |
|
||||
| P0 | done; AIR format 0 frozen as the semantic baseline (spec 07 §8.7) |
|
||||
| P1 | next |
|
||||
| P2–P8 | not started |
|
||||
@@ -6,7 +6,7 @@ Non-normative. Part of the [implementation plan](README.md).
|
||||
|
||||
**Exit criterion:** AIR `hello` and arithmetic tests execute identically across runs. Per Q-008, Phase 0 `hello` is a `@main` returning a value; output to stdout arrives in P2-11.
|
||||
|
||||
**Spec inputs:** spec 00 §5–6, 01 §6, 02 §1–3, 07, 08 §1–2, §7, 10 §2, 11 §1. RFC 0004 moves to Accepted at the end of this phase.
|
||||
**Spec inputs:** spec 00 §5–6, 01 §6, 02 §1–3, 07, 08 §1–2, §7, 10 §2, 11 §1. RFC 0004 was accepted for AIR format 0 after the exit review.
|
||||
|
||||
**Blocking questions:** Q-001 grammar, Q-002 contracts, Q-003 parse codes, Q-004 traps, Q-005 budget, Q-006 target description, Q-007 integer edge cases, Q-008 `hello`, Q-016 floats.
|
||||
|
||||
@@ -32,7 +32,7 @@ Out: floats (reserved until Q-016 is answered), fixed arrays (moved to P1 with s
|
||||
| P0-10 | done | Deterministic verifier budget | P0-7 | `src/verifier/budget.zig` | E5101 test with an oversized module; budget value matches spec |
|
||||
| P0-11 | done | Interpreter core | P0-8, P0-9 | `src/interp/machine.zig` | arithmetic programs run; overflow, assert and explicit `trap` produce the trap records defined in P0-2 |
|
||||
| P0-12 | done | `aji run`; `expect: run` / `stdout:` / `trap:` in the conformance runner; double-run determinism check | P0-11 | `src/main.zig`, `tools/conformance.zig` | runner fails a test whose two runs differ |
|
||||
| P0-13 | done | Phase exit review | all | plan status, RFC 0004 status | `hello` and arithmetic suite pass; RFC 0004 amended for format 0 (acceptance is an owner decision); P0 status set to done |
|
||||
| P0-13 | done | Phase exit review | all | plan status, RFC 0004 status | `hello` and arithmetic suite pass; RFC 0004 Accepted for format 0; P0 status set to done |
|
||||
|
||||
## Conformance tests to add
|
||||
|
||||
@@ -45,6 +45,7 @@ Out: floats (reserved until Q-016 is answered), fixed arrays (moved to P1 with s
|
||||
- Exit criterion met: `zig build conformance` runs 41 Phase 0 tests (3 accept, 19 reject, 15 run); every run test is executed twice and the run records compared byte-for-byte.
|
||||
- Every code introduced in Phase 0 has a reject test: E0001–E0006, E1001–E1003, E5001, E5002, E5101; traps T0001–T0007 each have a run test.
|
||||
- Parser and verifier survived 6 000 mutated corpus inputs through `aji check` and `aji run` without a crash (one crash found and fixed).
|
||||
- RFC 0004 received Amendment 1 describing the format-0 additions; its status stays Proposed until the language owner accepts it.
|
||||
- RFC 0004 with Amendment 1 was accepted by the language owner (scope: AIR format 0, language 0.1). Its rules live in spec 07 §8, spec 07a and `reference/air-text.ebnf`.
|
||||
- **Format 0 is the frozen semantic baseline** (spec 07 §8.7, DD-012). Phases 1–3 may add instructions, types, features and codes; changing the meaning of an existing format-0 construct requires `air 1` and an RFC.
|
||||
- Deferred: interpreter memory grows with the number of calls and aggregates created, because everything lives in one arena per run. Acceptable for conformance tests; revisit with the Phase 1 memory model.
|
||||
- New open question Q-019 (non-terminating programs in test tooling).
|
||||
- Q-019 resolved after the review: deterministic instruction fuel (spec 11 §7), outcome `limit_exceeded`, exit code 5; the conformance runner always runs with fuel.
|
||||
@@ -6,7 +6,7 @@ Non-normative. Part of the [implementation plan](README.md).
|
||||
|
||||
**Exit criterion:** the file-copy core (buffer handling, regions, slices) is implemented in AIR, and the verifier rejects representative use-after-move, aliasing and out-of-bounds cases.
|
||||
|
||||
**Spec inputs:** spec 02 §4–5, 03 §1–11, 08 §3–6, 13 §2. RFC 0001 moves to Accepted (island sections may stay Proposed until P4).
|
||||
**Spec inputs:** spec 02 §4–5, 03 §1–11, 08 §3–6, 13 §2. RFC 0001 memory sections are proposed for acceptance (owner decision; island sections may wait until P4); acceptance integrates them into the spec.
|
||||
|
||||
**Blocking questions:** Q-009 borrow lifetimes in AIR, Q-010 region generation checks.
|
||||
|
||||
@@ -20,7 +20,7 @@ Out: islands, `Arc`, `Pin`, raw addresses (beyond rejecting them in safe code).
|
||||
|
||||
| ID | Status | Task | Depends | Output | Done when |
|
||||
|---|---|---|---|---|---|
|
||||
| P1-1 | todo | Resolve Q-009 and Q-010; review RFC 0001 memory sections to Accepted | — | spec 03, 07, RFC 0001 | questions resolved; RFC status updated |
|
||||
| P1-1 | todo | Resolve Q-009 and Q-010; propose RFC 0001 memory sections for acceptance | — | spec 03, 07, RFC 0001 | questions resolved; RFC ready for the owner, rules integrated on acceptance |
|
||||
| P1-2 | todo | Contract tables for Phase 1 opcodes | P1-1 | spec 07 appendix | every in-scope opcode has all spec 07 §4 fields, including verifier transfer function |
|
||||
| P1-3 | todo | Interpreter memory: allocations, provenance, bounds, region generations, uninitialized bytes | P1-2 | `src/interp/memory.zig` | unit tests: every access checks provenance; reading uninitialized bytes is detected in interpreter debug checks |
|
||||
| P1-4 | todo | Initialization verifier | P1-2 | `src/verifier/init.zig` | E1010 accept/reject (scalar, struct field, array prefix) |
|
||||
|
||||
@@ -6,9 +6,9 @@ Non-normative. Part of the [implementation plan](README.md).
|
||||
|
||||
**Exit criterion:** `parallel_map` and `channel_transfer` examples run under deterministic and randomized schedules.
|
||||
|
||||
**Spec inputs:** spec 04 §1–19, 11 §3, §5–6. RFC 0002 moves to Accepted.
|
||||
**Spec inputs:** spec 04 §1–19, 11 §3, §5–6. RFC 0002 is proposed for acceptance (owner decision); acceptance integrates it into the spec.
|
||||
|
||||
**Blocking questions:** Q-013 deterministic `select` and seeds, Q-014 Send/Share for capability-holding aggregates.
|
||||
**Blocking questions:** Q-013 deterministic `select` and seeds, Q-014 Send/Share for capability-holding aggregates. (Q-019 is resolved: fuel, schedule budget and quantum are defined in spec 11 §7.)
|
||||
|
||||
## Invariants (AGENTS.md change checklist applies to every task here)
|
||||
|
||||
@@ -22,9 +22,9 @@ Non-normative. Part of the [implementation plan](README.md).
|
||||
|
||||
| ID | Status | Task | Depends | Output | Done when |
|
||||
|---|---|---|---|---|---|
|
||||
| P3-1 | todo | Resolve Q-013, Q-014; RFC 0002 to Accepted | — | spec 04, 11 | questions resolved |
|
||||
| P3-1 | todo | Resolve Q-013, Q-014; propose RFC 0002 for acceptance | — | spec 04, 11 | questions resolved |
|
||||
| P3-2 | todo | Contract tables: `task.*`, `thread.*`, `channel.*`, `mutex.*`, `rwlock.*`, select | P3-1 | spec 07 appendix | all spec 07 §4 fields including synchronization effects |
|
||||
| P3-3 | todo | Deterministic scheduler: seeds, choice points, choice log | P3-2 | `src/interp/sched.zig` | same seed ⇒ identical trace; choice log replays a run |
|
||||
| P3-3 | todo | Deterministic scheduler: seeds, choice points, choice log; global fuel across tasks and a separate `quantum` (spec 11 §7.2) | P3-2 | `src/interp/sched.zig` | same seed ⇒ identical trace; choice log replays a run; fuel is the sum over all tasks |
|
||||
| P3-4 | todo | Send/Share/Local derivation | P3-1 | `src/verifier/send_share.zig` | E4001, E4002 accept/reject |
|
||||
| P3-5 | todo | Task-scope verifier and scoped borrows | P3-2 | `src/verifier/tasks.zig` | E4301, E4302 accept/reject |
|
||||
| P3-6 | todo | Concurrent alias / data-race rejection | P3-5 | `src/verifier/borrow.zig` | E4101 accept/reject; disjoint `split_mut` halves accepted in two tasks |
|
||||
@@ -33,7 +33,7 @@ Non-normative. Part of the [implementation plan](README.md).
|
||||
| P3-9 | todo | Mutex and RwLock with linear guards | P3-7 | interpreter + verifier | guard not `Send`; unlock consumes guard; E3002 on leaked guard |
|
||||
| P3-10 | todo | Async I/O buffer claims | P3-7 | verifier + runtime | E4303 accept/reject |
|
||||
| P3-11 | todo | Blocking effect and blocking pool policy | P3-7 | spec 04 §18, runtime | `thread.block` from ordinary task handled per spec |
|
||||
| P3-12 | todo | Runner: `seed:`/`schedules:` headers; stress modes (1/2/N workers, random, forced yield, slow consumer, cancellation during waits, I/O reordering) | P3-3 | `tools/conformance.zig` | stress modes selectable; failing seed printed for replay |
|
||||
| P3-12 | todo | Runner: `seed:`/`schedules:`/`quantum:` headers (schedule budget kept separate from fuel); stress modes (1/2/N workers, random, forced yield, slow consumer, cancellation during waits, I/O reordering) | P3-3 | `tools/conformance.zig` | stress modes selectable; failing seed printed for replay |
|
||||
| P3-13 | todo | Reference programs: parallel-map, channel transfer, tcp-echo with tasks | P3-8, P3-9 | `tests/programs/` | pass under all stress modes |
|
||||
| P3-14 | todo | Phase exit review | all | plan status | exit criterion passes |
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ 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 move to Accepted.
|
||||
**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.
|
||||
|
||||
@@ -29,7 +29,7 @@ Non-normative. Part of the [implementation plan](README.md).
|
||||
| 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 fully Accepted |
|
||||
| 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
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Non-normative. Part of the [implementation plan](README.md).
|
||||
|
||||
**Exit criterion:** the litmus suite (`reference/concurrency-litmus.md`) and atomic-publication conformance tests pass, including allowed weak outcomes.
|
||||
|
||||
**Spec inputs:** spec 04 §20–32, 11; `reference/concurrency-litmus.md`. RFC 0003 moves to Accepted.
|
||||
**Spec inputs:** spec 04 §20–32, 11; `reference/concurrency-litmus.md`. RFC 0003 is proposed for acceptance (owner decision); acceptance integrates it into the spec.
|
||||
|
||||
**Blocking questions:** Q-015 operational weak-memory model, Q-017 replay format.
|
||||
|
||||
@@ -21,7 +21,7 @@ Non-normative. Part of the [implementation plan](README.md).
|
||||
|
||||
| ID | Status | Task | Depends | Output | Done when |
|
||||
|---|---|---|---|---|---|
|
||||
| P5-1 | todo | Resolve Q-015, Q-017; RFC 0003 to Accepted | — | spec 04, 11 | questions resolved |
|
||||
| P5-1 | todo | Resolve Q-015, Q-017; propose RFC 0003 for acceptance | — | spec 04, 11 | questions resolved |
|
||||
| P5-2 | todo | Contract tables: `atomic.load`, `atomic.store`, `atomic.rmw`, `atomic.cmpxchg`, `atomic.fence` | P5-1 | spec 07 appendix | all fields present, including allowed orderings per op |
|
||||
| P5-3 | todo | Atomic types and ordering validation | P5-2 | `src/verifier/atomics.zig` | E4201 accept/reject for every op, including cmpxchg failure order |
|
||||
| P5-4 | todo | `atomic` / `atomic.weak` effect marking | P5-3 | verifier + report | relaxed use without `atomic.weak` rejected per Q-011 outcome; weak sites listed in report |
|
||||
|
||||
Reference in new issue
Block a user