Commit Graph
8 Commits
Author SHA1 Message Date
dev 4242132b2a Phase 5: atomics through every layer (RFC 0015)
AIR: linear atomic<T> (AtomicScalar), atomic.new/take/load/store/RMW/
cmpxchg (two results)/fence with explicit orderings; feature atomics
published. Verifier: ordering tables (E4201), ordinary access (E4202),
effects [atomic] / [atomic, atomic.weak], linearity, take while lent
(E4101, also for mutex.take). Interpreter: timestamped message machine
(src/interp/weak.zig); views travel through spawn/join, channels, mutexes,
close and cancel; seq_cst reads the latest message and programs without
weak reads make no extra draw (existing records unchanged). aji explore:
exhaustive exploration that branches only before visible operations.
Litmus: 20/20 tests give exactly the oracle's sets; differential test
(1500 random programs) found no unsound outcome. .aji layer 10, Quick
Reference atomics, source coverage 67/67, audit report atomic_operations.
AIR bundle +5.9 %, QUICK.md +0.5k.
2026-10-06 08:05:01 +03:00
dev 2bbbd2135c rfc: 0015 scalar atomics and the Aji memory model accepted (revision 2) and integrated into the spec
The Aji RC11 profile (RC11 with NO-THIN-AIR; stronger than ISO C11/C++20) as
normative axioms in spec 04 §20; DRF-SC; linear atomic<T> for AtomicScalar
with atomic.new/atomic.take; ref<atomic<T>> operands; ordering tables incl.
cmpxchg failure table and two results; effects [atomic] / [atomic, atomic.weak];
target atomic_widths and E4203; E4202; enumerator as oracle (observed ⊆ allowed,
exact equality on the normative litmus corpus). Feature atomics stays reserved
until P5-2a. Q-015 resolved; record/replay and Q-017 moved to Phase 8.
RFC 0003 superseded. AIR bundle +1.9 %.
2026-10-06 00:30:35 +03:00
dev 3c5c129078 P4-11: air-text.ebnf covers the syntax of Phases 2–4
Types cap<K>, resources, own/region, scope/task/shield, endpoints,
mutex/guard, island/frozen/iref/arc and the built-in enums; productions
for capability, heap, region, task, cancellation, channel, sync and graph
instructions, with the named-edge terminator forms. Every opcode in the
conformance corpus and in the spec contract tables has a production.
AIR bundle +3.6 % (cl100k), recorded.
2026-10-05 22:17:28 +03:00
dev c699529fec Phase 4: islands, frozen graphs and arc through every layer (RFC 0014)
AIR: types island<T>, frozen<T>, arc<T>, iref<T>; 16 instructions
(island.create/alloc/root/borrow/freeze/destroy, frozen.root/borrow/
release, arc.from_frozen/new/clone/release/root/borrow, iref.eq); features
islands (depends on heap) and arc (depends on islands) published.
Verifier: IslandSafe/ArcSafe (E2111 at the owner type), container child
borrows (one mut access per island), Send/Share rows (island not Share),
linear owners, mem.alloc effect, element rules (recursion through iref).
Interpreter: graphs with never-reused identities, T0010 for a foreign
iref, O(1) freeze/conversion/transfer, arc counts in a trace hook
(Options.arc_events), budgets per the quota table, collector support.
.aji layer 9: types, operations, island.at/frozen.at/arc.at as borrow
places with explicit container borrows, iref ==/!=.
Frontend fix: joins carry only variables the construct assigns (and that
are read again), so an unchanged linear value is never a block argument
while borrowed.

Tests: 10 AIR (phase4), 6 .aji run + 12 rejects (layer9), the reference
program island-pipeline in .aji, equivalent to an independently
hand-written AIR program (36 on 30 schedule seeds); unit tests for the
arc count trace and O(1) transfer. Quick Reference §7 graphs (checked
excerpt of quickref/graphs.aji); coverage 61/61. Bundle growth: AIR
+7.0%, Quick Reference +0.6k, source docs +4.2k (recorded).
Spec: quota rows match the header-reserved count; idioms and iref
recursion in spec 03 §22; P4-11 (air-text.ebnf gaps) recorded.
2026-10-05 22:14:05 +03:00
dev 0c727eb363 Phase 3: bundle measurement and draft exit review
bundle 35 324 tokens (+0.6 % since RFC 0012 integration; Phase 3 total
+29.2 %); exit review drafted, open on P3-11
2026-10-04 17:01:40 +03:00
dev b82bc35c5f spec: accept RFC 0012 and integrate waits, channels, select and mutex
revision 2 per owner review: reserved-feature dependencies may change
until publication (general rule, DD-014); task.join.cancel returns the
handle on cancelled with loans still LOANED; channel.sender.dup from
ref<sender<T>> (MPSC, receiver_dup reserved); task.wait required by
every suspending operation, task.join included, only in modules
declaring cancellation; sent values and handles come back as block
parameters on closed/cancelled edges; explicit channel states

spec 04 §37-§41 and pointers in §11-§16, §35, §36; spec 05 §9, 07
§8.11, 07a, 08 §14, 11 §6-§7; features cancellation, channels, sync
published (implementation pending); rwlock, channel_transfer,
receiver_dup, guard_transfer reserved; effect task.wait; E4304, E4305;
Q-013 resolved; bundle +15.8 % tokens (recorded)
2026-10-04 16:27:38 +03:00
dev ab5814a7bb Phase 3: structured tasks and the deterministic scheduler (RFC 0011)
- interpreter core rewritten around explicit per-task frame stacks so a
  task can be suspended at any instruction; behavior of all existing
  tests unchanged
- tasks: scope and task<T> (function-bound; task_transfer and
  task_borrow_returns reserved), spawn/join/cancel/cancelled/scope.end;
  cooperative scheduler with seeded choice rule, separate schedule seed,
  quantum = fuel unit, task limit (limit_exceeded kind tasks), global
  quiescence over waiting tasks; schedule field in the run record
- verifier: Send/Share table (E4001, E4002), loans as task-owned borrows
  (E4302 on early end, E4101 on conflicts), E4301 at scope end, task
  effects (E3101)
- CLI --quantum, --task-limit, --schedule-seed; runner schedules:,
  quantum:, task_limit:, limit_exceeded:
- fixed: schedule seed default used orelse/^ precedence wrongly
- 15 phase-3 conformance tests; 4000 mutants without a crash
- Agent Reference Bundle +10.9 % tokens (recorded)
2026-10-04 16:02:03 +03:00
dev 6eceb4405b E0-1: Agent Reference Bundle and Phase 2 baseline
- docs/agent/bundle.txt: minimal AIR reference by file and section
  (grammar, instructions, types, traps, verifier rules, resources,
  effects, capabilities, intrinsics, heap/regions, unsafe, runtime
  contract, diagnostics and registries); syntax-example.air verifies
  and runs
- zig build agent-reference: deterministic bundle and report (files,
  sections, bytes, lines, words); section extraction ignores fenced code
- tools/agent_bundle_tokens.py: cl100k_base, o200k_base and Qwen2.5 BPE
  counts; growth warnings >10 % and review >20 % against history.json
- baseline after Phase 2: 104 250 bytes, 16 197 words, ~27.3k tokens
- CI builds the bundle and counts tokens (non-blocking)
- evaluation protocol 0.2: benchmark families, Aji/AIR and Aji/source
  conditions, 36-run engineering smoke test, order of work
- RFC template and AGENTS.md: report bundle growth
2026-10-04 15:44:26 +03:00