Phase 5 exit review
This commit is contained in:
1 parent
0879b9497b
commit
7bbbe34b94
2 files changed
+53
-2
No files matched your search
+1
-1
@@ -156,5 +156,5 @@ Targets for Phase 6A, measured on dev tasks:
|
||||
| P3 | done (exit review in the phase file); P3-10, P3-11 moved to P7 |
|
||||
| P6A | done (exit review in `phase-6-source-language.md`; P6A-9 [results](../evaluation/results/2026-10-05-p6a-9.md)): the agent-facing source language over AIR is the architecture |
|
||||
| P4 | done (exit review in the phase file) |
|
||||
| P5 | implementation in progress (GO 2026-10-06): RFC 0015 accepted, M/C regression PASS, normative litmus corpus 20/20 against the independent oracle |
|
||||
| P5 | done (exit review in the phase file): atomics through every layer; litmus 20/20 exact against the independent oracle; race detector on every run test |
|
||||
| P7, P8 | not started |
|
||||
@@ -89,7 +89,7 @@ Phase 4 commit frozen (tag p4-frozen)
|
||||
| P5-9 | done | Litmus runner and differential test (random small programs; interpreter outcomes ⊆ oracle outcomes) | P5-7 | `tests/litmus/`, `zig build litmus` | all corpus tests pass with exact equality; differential test in CI |
|
||||
| P5-9a | done | `.aji` layer 10 (spec 15 §12), Quick Reference subsection after mutexes, source coverage rows, bundle measurement | P5-4 | `src/frontend/`, `docs/agent/` | `.aji` run/reject tests for every row; Quick Reference excerpts checked; growth recorded against RFC 0015's estimate |
|
||||
| P5-9b | done | Reference program with atomics in AIR (written by an independent author from the spec) and `.aji`, with `equivalent:` | P5-9a | `tests/conformance/` | passes under all stress modes and under `aji explore` with no forbidden outcome |
|
||||
| P5-10 | todo | Phase exit review | all | plan status | exit criterion passes |
|
||||
| P5-10 | done | Phase exit review | all | plan status | exit criterion passes |
|
||||
|
||||
## Regression gate (P5-0)
|
||||
|
||||
@@ -111,3 +111,54 @@ These criteria were fixed before the runs. M and C are a regression corpus only.
|
||||
## Conformance tests to add
|
||||
|
||||
Negative corpus entry owned by this phase: invalid atomic ordering. Litmus: MP, SB, mutex handoff, channel handoff, spawn/join, invalid ordinary race.
|
||||
|
||||
All present: `load_release.air`, `store_acquire.air`, `fence_relaxed.air`, the two compare-exchange cases and `invalid_order.aji` (invalid ordering, `E4201`); the litmus corpus covers MP, SB, the handoffs and spawn/join; the invalid ordinary race is `tasks_access_lent.air` (`E4101`, Phase 3) plus the race detector's unit test.
|
||||
|
||||
## Exit review
|
||||
|
||||
- **Exit criterion met.**
|
||||
- The interpreter's exhaustive exploration (`aji explore`) of every test of the normative litmus corpus gives exactly the allowed set: 20/20, `python3 tools/litmus/run_interp.py`, in CI.
|
||||
- The atomic-publication tests pass in AIR (`atomic_publication.air`) and `.aji` (`layer10/publication.aji`) on 30 schedule seeds.
|
||||
- **Decision records.**
|
||||
- RFC 0015 was accepted (revision 2, with the owner's editorial corrections) and integrated into spec 02, 04, 05, 07, 07a, 09, 10, 11, 13 and 15.
|
||||
- Q-015 and Q-024 are resolved; Q-017 moved to Phase 8 with record/replay (P8-10); Q-025 is logged.
|
||||
- The feature `atomics` is published.
|
||||
- **Gates before implementation, all met:**
|
||||
- P5-0, the M/C regression on `p4-frozen`: PASS, with one latent frontend defect found and fixed;
|
||||
- the independent oracle: 21/21 self-tests;
|
||||
- the corpus: 20/20 against the oracle.
|
||||
- **Invariants, each with tests:**
|
||||
|
||||
| Invariant | Evidence |
|
||||
|---|---|
|
||||
| no atomic operation without an explicit, valid ordering | orderings are part of the opcode; `E4201` tests for load, store, fence, both compare-exchange tables, in AIR and `.aji` |
|
||||
| safe code never accesses atomic storage as ordinary storage | `E4202` (`ordinary_load.air`, `ordinary_read.aji`); a cell leaves only through `atomic.take` under exclusive ownership (`E2101`, `E4101`) |
|
||||
| DRF-SC for programs without ordinary races | the race detector runs on every conformance run test (433, none reported) and catches an unverified racy program on every schedule (unit test); `sc_only` programs need only `effects [atomic]` |
|
||||
| the interpreter neither forbids allowed outcomes nor produces forbidden ones | exact litmus equality (20/20); the differential test (1 650 random programs across seeds, in CI 150 per run) found no unsound outcome, and 98 % were exact |
|
||||
|
||||
- **Vertical rule.** Every construct went through spec → AIR → verifier → interpreter → `.aji` (layer 10) → Quick Reference (Atomics, excerpt checked by `quickref/atomics.aji`) → conformance in AIR and `.aji` → reference program. The reference program is `atomic_stats` in `.aji`, equivalent to hand-written AIR by an independent author. Source coverage: 67/67 constructs.
|
||||
- **Conformance.** 433 tests. Phase 5 adds:
|
||||
- 22 AIR tests (5 run, the reference program included, and 17 reject);
|
||||
- 18 `.aji` tests (4 run, 12 reject, the Quick Reference excerpt and the reference program).
|
||||
- **Determinism.**
|
||||
- Programs without non-`seq_cst` reads make no new choice, and every existing run record is unchanged (all earlier tests pass unmodified).
|
||||
- Weak choices come from the schedule stream.
|
||||
- Collect-every-step and `--stress 200` pass.
|
||||
- **Complexity budget** (cl100k):
|
||||
|
||||
| Bundle | Before (P4-11) | After | RFC 0015 estimate |
|
||||
|---|---|---|---|
|
||||
| AIR bundle | 39 154 | 42 275 (+8.0 %) | +3–4k (≈ +9 %) |
|
||||
| `QUICK.md` | 5 013 | 5 511 | +500–700 |
|
||||
| Source docs | 26.7k | 28.5k | +2–3k |
|
||||
|
||||
The formal axioms (spec 04 §20) stay out of both bundles.
|
||||
- **Known limitations:**
|
||||
- `aji explore` is exhaustive only for small programs. With loops over weak reads the tree grows quickly, and `--max-runs` bounds it (the reference program: 200 000 runs, one outcome, incomplete).
|
||||
- The interpreter is complete only on the corpus, as the spec allows. Its soundness is checked (corpus and differential test), not proved; `seq_cst` accesses go through a global SC view.
|
||||
- The race detector does not check I/O buffers filled by intrinsics. Joining the SC view can hide a race (false negatives are possible); false positives have not been seen.
|
||||
- Atomics are excluded from aggregates, arrays, graphs and `arc` (`linear_aggregates`, U4).
|
||||
- There is no weak compare-exchange and no 128-bit cells.
|
||||
- The native-backend obligations (NO-THIN-AIR mappings, `atomic_widths`) are P7 work.
|
||||
- **Not run in this phase:** the M/C regression after Phase 5. The agent-facing language changed only by additions (layer 10, Quick Reference Atomics), and M/C use no atomics.
|
||||
- **Next:** an owner decision on the next phase (P7 native backend, P8 agent protocol, or the independent held-out benchmark first).
|
||||
Reference in new issue
Block a user