Skip to content

Latest commit

 

History

History
172 lines (143 loc) · 16.8 KB

roadmap.md

File metadata and controls

172 lines (143 loc) · 16.8 KB

Roadmap

Status: the stage list below comes from the founding brief, as amended by ADRs 0010, 0017–0024 and 0029–0032. Stages 4, 6 and 7 were adjusted by ADRs 0010, 0017 and 0018. Refinement #4 (formatter in Stage 2) is done: ail fmt (ADR 0169, ADR 0170).

Stages (from the founding brief)

Stage Goal Exit criteria (proposed) State
1 Language specification and design All 28 design topics have accepted ADRs. The spec chapters are drafted. The token benchmark corpus (layers 1–2) exists and is used for syntax decisions. Core done (2026-10-04, ADR 0086). Remaining topics continue alongside Stage 2.
2 Entry criteria (ADR 0086): concurrency model, modules and packages core, strings/collections/loops/literals, entry point and printing, and the unsafe/FFI core model are decided. First milestone: ./ail run examples/hello.ail on macOS. Then: lexer, parser, AST, type checker, first semantic API (bootstrap in Rust: ADR 0023; API: ADR 0024) All spec examples parse and type-check. Diagnostics are structured. Conformance harness running. Semantic API v1 published. Done for v0.1.0. ./ail run examples/hello.ail runs on macOS ARM64, Linux x86-64 and Windows x86-64; the compiler, checker and tools are written in AIL and ail builds itself from a published seed (ADR 0855). The semantic API v1, structured diagnostics and the conformance harness ship. The historical milestone log is in status.md.
3 Interpreter: the semantic reference implementation and differential-testing oracle (ADR 0018); the front end ported to AIL (compiler/, run by the bootstrap and differentially tested against it) Semantics validated by running the conformance suite. The AIL lexer, parser and checker agree with the Rust ones on the whole corpus. Superseded. The interpreter and the Rust bootstrap are deleted (ADR 0904); the front end in AIL (lexer, parser, checker in compiler/) is the only one.
4 Optimising native backend, written in AIL (ADR 0022), run on the interpreter until it compiles itself; then the front end is ported to AIL. Built on AIL's own toolchain (ADR 0010: no LLVM; ADR 0017: no C; ADR 0018: optimising from the start; ADR 0015/0016: single-mode WPO with full observability) All 5 Tier 1 targets produce working binaries with AIL's own encoder and linker. Differential tests match the interpreter. Every host can build for every target (ADR 0031). The drag-race harness runs, and first results against clang and gcc are published (ADR 0030). Done for v0.1.0. The native backend, encoders and linkers for macOS ARM64, Linux x86-64 and Windows x86-64 are written in AIL, with no LLVM and no C. Linux ARM64 is checked under emulation only; Windows ARM64 is untested. The drag race is in benchmarks.md.
5 Custom runtime and GC Runtime and GC pass stress tests on all targets, gated on ARM64 for weak-memory correctness. Done for v0.1.0. The native runtime and a stop-the-world mark-sweep collector ship (ADRs 0562–0564); stress tests run in the gate.
6 Optimizer maturation Keeps making generated code faster on the benchmark suite, using thresholds the designer sets. Ongoing. An optimizing backend ships (CSE, inlining, bounds-check elimination, vectorisation, auto-parallel loops). Speed work continues; see benchmarks.md for the numbers.
7 (merged into Stage 4 by ADR 0018) — —
8 Complete the AI semantic interface (started in Stage 2) All brief §12 queries are answerable. Done for v0.1.0. ail api, ask, context, explain, fix, review, try, task and the MCP server answer the queries of the founding brief (status.md).
9 Advanced optimisation, profiling, debugging, cross-platform tooling Profile-guided optimisation, debugger, and profilers on all targets. Partly done. Profiling (ail perf, tracing, coverage), time-travel record and replay, and live attach ship. Debug info (DWARF and PDB, ADR 0021) and profile-guided optimisation are planned, and are not in 0.3.

Proposed refinements (history: decided long ago)

History, dated before the Rust removal; each was resolved in an ADR. These were recommendations only. Each will be put to the designer as a question.

  1. Start the AI semantic interface in Stage 2. Accepted as ADR 0024.
  2. Run token and performance benchmarks early. Accepted: token benchmarks start in Stage 1 (ADR 0029). The performance drag-race harness ships with Stage 4 (ADR 0030).
  3. Keep the bootstrap backend as a permanent performance reference. Rejected by ADR 0010. Clang, gcc and rustc serve only as external comparison baselines.
  4. Write the formatter in Stage 2. Canonical formatting shapes the grammar, and every later example in the docs should already be canonical. Done (2026-10-20): ail fmt, ADRs 0169–0170, style in design/formatting.md.

Rust bootstrap deleted (ADR 0904)

bootstrap/, the interpreter, cargo and the private Rust toolchain (ADR 0087) are gone; ./ail builds from the published seed (ADR 0855). Notes below that name the bootstrap, the interpreter, tools/verify.sh selftests or the bytecode tier are history. The remaining plan is "After Rust removal" and the backlog queue below.

Next milestone (history: Stage 2, milestone 8; drafted 2026-10-20)

History: written before the Rust removal and kept for the record. For what comes next, see "Toward 0.3" below.

Drawn from what is still open after the overnight buildout; the order is a proposal, not a decision.

Day 1 of batch 2 reached main on 2026-10-21 as PR #223 (106 lane pull requests; Linux 360/360 and macOS 359/359 selftests). What landed is listed in status.md.

  1. Verify on macOS ARM64: run tools/verify.sh on the whole 2026-10-20 batch (the strict-lockstep rule, ADR 0008).
  2. Stage 3 started 2026-10-20 (designer's decision): the lexer, parser and checker in AIL under compiler/, run by the bootstrap and differentially tested against it (lanes 113–114). Stage 3 and 4 groundwork: build the tiers designed in ir-architecture.md (AST, HIR, MIR, machine IR) and the first native code for the hot loops the interpreter shows (tools/perfbench/run.sh); meanwhile a bytecode tier in the bootstrap (ADR 0359; slices 1–4 are ADRs 0361–0364). Native runtime and ABI (lane 122, ADRs 0404–0409): native-abi.md; compiler/rt/rt.ail has number text, strings, lists and traps on a machine model; syscalls and entry wait for the encoders.
  3. Dependencies: git dependencies and ail.lock (no registry, ADR 0383); in-house TLS for std.net (ADR 0360, done: ADRs 0366–0369); hardware AES-GCM (AES-NI and PCLMULQDQ on x86-64, the crypto extension on ARM64, detected through AT_HWCAP on Linux) and proxy support (ADR 0869) are done.
  4. Rust-free check (designer, 2026-10-20): now that the shipped toolchain no longer needs Rust (ADR 0904), rebuild ail-edit (its own repository) with the self-hosted toolchain and compare it with the Rust-bootstrap baseline in editor-baseline.md (in kksimp/ail-edit, docs/) (start-up, ail check time, test time, tokens, memory, and keystroke/redraw latency).
  5. Hardware: accelerator backends for std.tensor (allowed by ADR 0381; CPU slice gaps first, then Vulkan and Metal, then NPUs) and weaker atomic orderings (OQ-097).
  6. Post-1.0 (after milestone 8 and the native toolchain): a Python on-ramp, ail port app.py from typed Python to AIL, or a Python-syntax front end (OQ-119, designer's question of 2026-10-20).
  7. Open language questions: safe member access and matching on error sets (OQ-029), custom hashing (OQ-042), unique values in generic code (OQ-050), loop invariants and static proof (OQ-060), downcasting any Trait (OQ-094).

After Rust removal: AI-first tooling (designer, 2026-10-23)

Order per ADR 0868; each is native and costs nothing when unused: ail ask semantic queries; uhwhatnow?, a hole that ranks the candidates that fit; edit impact (ail test --affected); native time-travel record and replay; token-priced diagnostics (one line or expanded, chosen by --budget); a native sandbox (capabilities plus CPU, memory and time caps); live attach to running binaries; contracts checked or fuzzed by tools (lower priority).

Backlog queue after Rust removal (designer, 2026-10-23)

Starts when the interpreter is gone. Lanes are grouped by the code they touch, so two lanes never edit the same area: the lanes run in parallel, and the items in one lane run in the order shown. A feature that changes the language or a public std API still needs its own ADR first.

  1. Checker and diagnostics (compiler/check/, compiler/explain/): uhwhatnow? (ranked typed holes); diagnostics in one-line and expanded forms chosen by --budget; then the open language questions OQ-029, OQ-042, OQ-050, OQ-094.
  2. Compiler graph tools (compiler/api/, compiler/edit/): ail ask; edit impact and ail test --affected; contracts checked or fuzzed by tools, with OQ-060 (lower priority). Then the AI-first tools the designer chose on 2026-10-24, in this order, each with its own ADR (0891-0897) and no cost when unused (ADR 0868): ail context SYM --budget N; @tool functions served by ail serve --mcp; ail try (a patch checked and tested in memory); effect changes in ail diff; ail infer (suggested requires/ensures); ail test --mutate; ail check --perf (shares facts with the optimizer).
  3. Native runtime (compiler/rt/): time-travel record and replay; the agent sandbox (capabilities plus CPU, memory and time caps); live attach.
  4. std.app and its host (std/app, tools/app-host/): the screen model (ADR 0878), Garlic first, then every GUI program; @observe and live attach (ADR 0879).
  5. App-side work (Garlic window, chrome and agent features; ail-edit; the other apps): tracked in each app's own repository and project since 2026-11-11, not in this roadmap. Language and std gaps they find are filed here.
  6. Packages and networking (std/net, packages): done (hardware AES-GCM, proxy support, git dependencies and ail.lock in the native loader).
  7. Tensors and hardware (std/tensor, backends): CPU gaps, then Vulkan and Metal, then NPUs; weaker atomic orderings (OQ-097).
  8. Optimizer (compiler/mir passes): purity-driven speed passes of ADR 0874: memoization by a cost model, pure-call CSE and hoisting, merging only where it is faster. Then two showcase programs the designer chose (2026-10-24), each with its own ADR: a database engine with its shell (file format, index, query language; an optimizer benchmark against C using contracts, ail test --mutate and ail check --perf; ADR 0898; its SQL layer shipped first as std.db, ADR 1207, with the tables in memory), and a media player or image editor on std.app (SIMD, multi-core and tensor speed; ADR 0899).
  9. Last: the Python on-ramp (OQ-119). The Rust-free rebuild of ail-edit and the drag race of Garlic against Chrome and Firefox moved to those apps' projects.

0.2.0 (released 2026-11-21)

Current release: v0.2.0. v0.1.0 (2026-11-15) was the first public tag; its list of what exists is the "0.2.0" section of status.md, and the user-facing list is the changelog. In short:

  • Language (done): never functions (ADR 1119), one-line if with elif (ADR 1120), locals that hide functions, modules and fields (ADR 1121), arithmetic operator traits and BigInt operators (ADR 1124), the methods agents guess (ADR 1125), every std module without use (ADR 1126), x = e else with a block (ADR 1128), T ! str (ADR 1129), the standard text failure Fail (ADR 1140).
  • Agent tools (done): ail ask std in one step (ADR 1123), certain fixes written into the file by ail check, build, run and test (printed as fixed PATH:LINE:COL: [RULE] TITLE), and fix: write CODE on the errors that are left.
  • Speed (done, measured at the release candidate): the native-backend work of ADRs 1141 to 1165; benchmarks.md is the only source for numbers.
  • Agent benchmark: the target (as few tries as C within a set margin, as correct, cheaper) was not met in the final run or in the rerun; agents are less efficient in AIL than in C until models learn it. The method and results are on agent-benchmark.md and in ADR 0916; the rerun result is added there.

Toward 0.3

Each item is a plan, not a promise; status.md says what exists. The changelog's "Unreleased (0.3)" entry is the user-facing list of what has landed.

Landed since 0.2.0:

  • Windows: the collatz slowdown with default threads is fixed (benchmark-gaps).
  • Agents: more first-draft mistakes are certain fixes or card lines (ADRs 1173, 1175, 1202, 1203, 1206, 1211); the public corpus of correct programs and mistake/fix pairs is in corpus/ (ADR 1174); ail ask NAME, ail eval, ail mv, the edit oracle and affected tests inside ail check (ADRs 1177, 1184, 1196, 1189, 1190).
  • Standard library: 62 new import paths, all experimental in 0.3 (ADR 1305), among them a TLS 1.3 server (ADR 1237), an HTTP/2 server and gRPC (ADRs 1285, 1286), an embedded SQL database (ADR 1207) and database clients.
  • Numeric kernels: exact integer dot products on bytes for quantized weights (ADRs 1324, 1326, 1333, 1336, 1344), std.lane byte lanes (ADR 1332) and float dot and mul_add (ADR 1316).
  • Hardware: GPU compute, step 1: the Metal host and --accel offload of parallel comprehensions on macOS (ADRs 1319, 1322); integer kernels for quantized weights on Metal and, on Linux, on Vulkan with SPIR-V the module builds itself (ADRs 1349, 1352, 1354, 1364).
  • Runtime: an adaptive heap goal with pages returned to the system (ADR 1187), parallel regions that learn their cost (ADR 1317), descriptor file handles (ADR 1341).

Still planned, not in 0.3 unless a later line of status.md says so:

  • Speed: the gaps in benchmarks.md (fasta, lzr, and the text rows floatparse, charat, charwalk), and on Windows WaitOnAddress in place of the polling waits.
  • Agents: agent-specific kits (ail new --agent NAME); a new agent benchmark run.
  • Language: const expressions (N + 1), Array[T, N], SIMD vectors on const generics (std.lane is not that design), export c library output, methods on distinct types (OQ-144).
  • Toolchain: debug info (ail build -g, DWARF and PDB, ADR 0021) and profile-guided optimisation; one native launcher, so routing leaves ail and ail.ps1 and the scripts only fetch the seed and build; a prebuilt ail per release.
  • Gate: a gate suite for ail merge, and a Linux ARM64 and a Windows ARM64 machine in the gate.
  • Hardware: GPU compute on Linux and Windows (Vulkan, ADRs 0958 and 1073), Linux ARM64 on hardware, Windows ARM64.
  • Apps are in their own repositories and projects, not planned here: Garlic, Garlic Press, ail-edit, Clove, Husk, Gridrun and ail-kernel. What they need from the language and std (video, canvas, a window path) is planned here.

Documentation roadmap

  • ail doc: a documentation tool written in AIL that replaces plain Markdown browsing (ADR 0003).
  • A conformance harness that extracts ail examples from docs/spec/ (ADR 0002). Done (2026-10-20, ADR 0172); it also checks the quick reference and the language card.