Commit Graph
13 Commits
Author SHA1 Message Date
dev 364eb57bbc diag: preserve envelope fields and reject JSON key collisions in tests 2026-10-07 19:28:36 +03:00
dev 8ee0f4c2bf diag: add factual related borrow and task locations 2026-10-07 19:12:58 +03:00
dev dbd9763713 diag: add stable source reasons and diagnostic incidence reporting 2026-10-07 18:52:36 +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 ca84ab4348 rfc: 0014 accepted (revision 2) and integrated into the spec
Owner review: D1-D4, D7-D9 accepted; D5 frozen.release, no thaw; D6
arc.from_frozen (island -> frozen -> arc, one graph identity), ArcSafe
(not Share alone; no arc<mutex>, no nested arc); D7 island Send, not
Share; D10 islands -> heap, arc -> islands; added: never-reused graph
identity, IslandSafe, the quota lifecycle, iref equality.

Integrated: spec 02 §6 (IslandSafe, ArcSafe), 03 §12-§14 and new
§22-§24 (instruction contracts, quota), 04 §13/§35/§38.1, 07a (features
islands, arc), 15 §8 (layer 9 syntax, explicit container borrows),
error codes (T0010, registered in src/diag.zig), type-properties. Phase 4
plan: P4-0, P4-1 done.
2026-10-05 21:57:08 +03:00
dev 748eddf4e5 P6A-11, P6A-12: malformed lowering is an internal compiler error; source type-check completeness
P6A-11: when a .aji module passed the frontend but its AIR does not parse
(E0001-E0005) or has invalid SSA/CFG (E5001, E5002), the result is one
E7900 source.internal_compiler_error at the source construct, with the
AIR code in air_code; semantic codes (E0006 included) are unaffected.
Unit test injects the checkpoint's `ret %` defect.

P6A-12: source-decidable type errors are E7005 at the source:
- `as` checks lossless widening with the verifier's own rule (shared
  function), and that both sides are integers
- slice.copy element types; own.free / region.destroy operand types
- element rules of channel.make<T> and mutex.make (no borrow, scope,
  task, shield or guard, at any depth)
Probing every source position found no other E1001/E1002 leak. The old
test encoding the previous rule (verifier_widen, E1002) is replaced by
typecheck/lossy_widen (E7005); 9 typecheck tests. Spec 15 §10 states the
frontend/verifier boundary.
2026-10-05 18:10:53 +03:00
dev 65b10e3fb5 spec: accept RFC 0013 and add spec 15, the .aji source language 0.1
Owner decisions D1-D7 and the boundary rule (source may hide
representation mechanics, never authority, allocation, ownership
transfer, synchronization, external effects or recoverable failure).
spec 15 normative: items, types, statements, expressions, places and
borrows, explicit move (named values), outcome matches and 'or trap',
scope/shield/lock blocks (lock lowering defined exactly), select,
channels, allocation, frame storage, lexical borrow scopes, inferred
features, one canonical spelling per construct. grammar.ebnf replaced;
E7001-E7007; E3101 gains suggested_effects; spec 01 examples updated.
2026-10-05 10:35:55 +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 c510a37cf9 spec: accept RFC 0009 and integrate unsafe boundaries
- spec 13 §6-§8: unsafe operations (assume, borrow.index.unchecked),
  contagious unsafe effect, trusted boundary with obligation, E6001,
  unsafe report, profiles as policy
- spec 05 §9.3: trusted is the one discharging boundary; spec 07 §8.10
  trusted syntax; 07a, 08 stage order and assume facts
- T0009, E6001 reasons; feature unsafe published
2026-10-04 14:38:53 +03:00
dev 48bb50724f spec: accept RFC 0005 and integrate Phase 1 memory model (P1-1, P1-2)
- RFC 0005 Accepted (revision 2)
- spec 07 §8.8 types and syntax; spec 07a contracts for features
  ownership and arrays; spec 08 §11-§14 borrows, facts, initialization,
  stage order; spec 03 frame storage, second-class borrows, static
  region generations
- grammar: from-returns, multi-result, new types and opcodes
- feature registry: ownership and arrays published; heap added and
  regions moved to Phase 2; borrow_joins reserved and unscheduled
- codes E2105-E2108, T0008
- Q-009, Q-010 resolved; Phase 1 and Phase 2 plans updated; Own test
  moved to phase 2
2026-10-04 13:10:08 +03:00
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
dev 41b764ccfd spec: Phase 0 spec gate (P0-1, P0-2, P0-3)
- text AIR format 0: grammar (reference/air-text.ebnf) and module,
  block, SSA, type and canonical-form rules (spec 07 §8)
- instruction contracts for format 0 (new spec 07a)
- traps: stable T0xxx codes and trap records (spec 01 §6)
- integer edge cases and explicit casts (spec 02 §2.1)
- fixed verifier resource limits (spec 08 §7)
- target description with pointer_bits (spec 09 §9)
- new codes E0001-E0006, E1003, T0001-T0007
- resolves Q-001, Q-003..Q-008, Q-018; Q-002 resolved for format 0
2026-10-04 12:14:25 +03:00
dev 17a55a7fef Initial import: Aji 0.1 draft spec and Zig scaffolding
Draft specification, RFCs, reference registries and examples, plus the
reference-implementation skeleton: build.zig, diagnostic envelope with
error-code registry synced to docs, aji CLI, conformance runner with seed
tests, CI and contributor docs.
2026-10-04 11:59:13 +03:00