An open API service indexing awesome lists of open source software.

https://github.com/alternative-intelligence-cp/nitpick

Nitpick Programming Language β€” systems language built for safety, determinism, and AI-native applications. LLVM backend, 80 packages, LSP, DAP debugger, GPU codegen.
https://github.com/alternative-intelligence-cp/nitpick

ai compiler gpu language-server llvm nitpick programming-language systems-programming

Last synced: 6 days ago
JSON representation

Nitpick Programming Language β€” systems language built for safety, determinism, and AI-native applications. LLVM backend, 80 packages, LSP, DAP debugger, GPU codegen.

Awesome Lists containing this project

README

          

# Nitpick Programming Language v0.40.7 (formerly Aria)


Nitpick logo: raccoon holding a magnifying glass

> 🚧 **Rebrand in progress:** Aria is becoming **Nitpick**. The `v0.18.0` tag is
> preserved as the final Aria-named K Framework semantics milestone. This repo
> still uses Aria names while the migration is underway; history, tags, and
> compatibility paths will be preserved. See [REBRAND_TO_NITPICK.md](REBRAND_TO_NITPICK.md).

[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![CI](https://github.com/alternative-intelligence-cp/aria/actions/workflows/ci.yml/badge.svg)](https://github.com/alternative-intelligence-cp/aria/actions/workflows/ci.yml)

**The Alternative Intelligence Liberation Platform presents: A systems programming language built for safety, determinism, and AI-native applications**

> ⚠️ **[READ THIS FIRST: SAFETY.md](SAFETY.md)** β€” No language is truly safe on its
> own. Nitpick makes dangerous operations **explicit** β€” you can't shoot yourself in
> the foot accidentally, but you can do it intentionally. Understand the safety
> contract before using `wild`, `async`, `@`, `extern`, or `wildx`.

---

## Current Status (June 2026)

**Released: v0.40.7 β€” Conditionals (`if`/`else if`/`else` + the `is` ternary) deep-dive complete (COND-DEC-001–014)**

The v0.40.x cycle hardened Nitpick's two conditional surfaces: the
`if`/`else if`/`else` statement chain and the `is (cond) : a : b` inline
value-ternary. All COND-DEC items resolved across v0.40.0–v0.40.7. The headline
fix taught the warning and borrow analyses to see through the `is` ternary
(`TERNARY` case added to `warnings.cpp` `collectIdentifiers` and
`borrow_checker.cpp` `checkExpression`), so a variable or borrow used only
inside an `is` arm is no longer a false `[unused-variable]`. Two more codegen /
analysis bugs fixed: a mixed-width PHI verification failure when an `is`
ternary's two arms had different integer widths (now the narrower arm is
sign-extended to the common type before the PHI), and `isTerminalStatement`
failing to recognize `exit` so dead code after a branch `exit` went unflagged.
Four diagnostics minted: `ARIA-IS-001` (incompatible `is` arms), `ARIA-IF-001`
(stray `else`/`else if`), `ARIA-IF-002` (assignment `=` used as a condition β†’
suggest `==`), and `ARIA-IF-003` (`if` used in value position β†’ points at `is`
and `pick`+`give`, ratifying that `if` is a statement and never an expression).
40 bug regressions (bug951–bug990), K core tests 229–235 (native `is` ternary
grammar `is ( Exp ) : Exp : Exp` with `strict(1)` condition and the two
reduction rules), and an 8-chapter `guide/conditionals/` cookbook. CTest
201/201, K core 235/235.

**Previous stable release: v0.39.6 β€” `when` / `then` / `end` loop-completion construct deep-dive complete (WHEN-DEC-001–012)**

The v0.39.x cycle made `when` a complete, sound, well-diagnosed
loop-completion construct: a `while`-style loop carrying optional `then` (clean
exit) and `end` (short-circuit) completion clauses. All WHEN-DEC items resolved
across v0.39.0–v0.39.6: the headline broke-flag codegen fix routing `break` to
`end` and clean exit to `then`; `continue` semantics (re-tests the condition,
does not mark completion); optional clauses (`then`-only, `end`-only, bare
`when`); the zero-iteration rule (a `when` that never completes an iteration
routes to `end`, not `then`); borrow-checker and unused-variable coverage of
all three blocks; arbitrarily nested `when` with innermost binding and labeled
`break(label)` / `continue(label)` escape; and three new diagnostics
`ARIA-WHEN-001..003` (stray `then`/`end`, duplicate clause, mis-ordered
`then`-after-`end`). 19 bug regressions (bug923–bug941), K core tests 223–228
(with a `completed` flag modeling the then-vs-end decision), and an 8-chapter
`guide/when/` cookbook. CTest 195/195, K core 228/228, K proofs 14/14.

**Previous stable release: v0.38.8 β€” Loop constructs deep-dive cycle complete (LOOP-DEC-001–015)**

The v0.38.x cycle made every loop form a complete, sound, well-diagnosed
construct. All 15 LOOP-DEC items resolved across v0.38.0–v0.38.8: the five loop
forms (`while`, `loop(start,limit,step)`, `till(limit,step)`, `for x in ...`,
C-style `for`), bare and labeled `break`/`continue` (loop labels via the
`label:` prefix, with full IR codegen so `break(outer)` / `continue(outer)`
steer an enclosing loop), break/continue transparency through `pick` arms,
`if`, and bare blocks (while `fall` stays pick-scoped), loan release on `break`
and liveness across `continue`, and loop `invariant` interaction with early exit
under both Z3 (`--verify-contracts`) and runtime (`--debug-contracts`) checking.
Five new diagnostics `ARIA-LOOP-001..005` (out-of-loop break/continue,
dead-code-after, unknown label, non-iterable, duplicate label). Two latent
codegen bugs fixed: a PHI-node mismatch on counted-`loop` invariants under
`--debug-contracts`, and an infinite loop when a scalar parameter is mutated
inside its own loop condition. 50 bug regressions (bug860–bug909), K core tests
216–222, and a 9-chapter `guide/loops/` cookbook. CTest 190/190, K core
222/222, K proofs 14/14.

**Previous stable release: v0.37.8 β€” `pick` / `fall` dispatch deep-dive cycle complete (PICK-DEC-001–015)**

The v0.37.x cycle made `pick` a complete, sound, well-diagnosed dispatch
construct. All 15 PICK-DEC items resolved across v0.37.0–v0.37.8: integer
dispatch with LLVM jump-table lowering, enum/tagged exhaustiveness, string
dispatch via `npk_string_equals`, `trit` finite domain + `tbb` balanced-binary
sticky-ERR, label-checked explicit `fall` (`ARIA-PICK-004`), nested picks,
`where` arm guards (new keyword), and `pick` as a value-yielding **expression**
with `give` (new keyword). Four new diagnostics `ARIA-PICK-001..004` (the `_`
wildcard hint, duplicate arm, unreachable arm, bad `fall` label). 52 bug
regressions (bug808–bug859), K core tests 211–215, and a 9-chapter
`guide/pick/` cookbook. CTest 181/181, K core 215/215, K proofs 14/14.

**Previous stable release: v0.36.7 β€” Enum deep-dive cycle complete (ENUM-DEC-001–015)**

The v0.36.x cycle fully delivered the Aria/Nitpick enum surface:
plain C-style enums (foundation since v0.2.39) and tagged-union variants
(variants carrying typed payload fields). All 15 ENUM-DEC items resolved across
v0.36.0–v0.36.7: pick on enum-typed vars, enum as struct field / fn param / return,
discriminant cast, derive(Display) and derive(Eq) for plain and tagged enums,
nested enum payloads (enum variant whose payload is another enum), and Result
interop. 10 bug regression tests (bug798–bug807), K core tests 208–210.

**Previous stable release: v0.35.7 β€” Arrays / Structs / Objects audit complete**

The v0.35.x cycle audited and locked the three primary aggregate types:
slice syntax (`arr[lo..hi]` half-open), multi-dim canonical form (`arr[i][j]`),
array iteration (`for elem in arr`), struct FFI ABI documentation, struct `==`
regression matrix, and `dyn Trait` as a struct field (OBJ-DEC-002).

The previous v0.34.x cycle audited and locked the failsafe and Design-by-Contract
surface: `failsafe`, `!!!`, `exit`, `requires`, `ensures`, `result`,
`invariant`, `prove`, `assert_static`, and `limit`. The cycle ratified
the endpoint rules for `main`/`failsafe`, consolidated failsafe code allocation
in `stdlib/failsafe_codes.npk`, wired contract/proof obligations into the Z3
backend, preserved runtime fallbacks where intended, and added the canonical
`aria-docs/guide/dbc/` cookbook.

The previous v0.33.x cycle audited and locked the Result-handling surface:
`pass`, `fail`, `?`, `??`, `?!`, `?|`, `defaults`, `raw`, `drop`, `_?`,
`_!`, safe navigation, `Result`, `await` parser shape, and contextual
`catch`. The cycle reconciled stale docs with shipped semantics: `?` is
fallback unwrap, `??` is Optional/pointer null coalescing, source-level `?!`
is emphatic fallback unwrap rather than failsafe dispatch, `_?` / `_!` are
prefix shorthands, and `catch` remains a contextual identifier-compatible
Result handler.

The previous v0.32.x cycle audited and locked the pointer/cast surface that
sits on top of the memory-interplay work: `->`, `<-`, `.`, `@`, checked
casts, `@cast_unchecked`, unsafe pointer arithmetic behind
`stdlib/unsafe.npk`, and NULL-dereference failsafe sentinel 46.

The previous v0.31.x cycle was a five-phase sweep across every memory, borrow,
async, trait, and special-value surface added since v0.26.x:

- **Phase 1 (v0.31.0.x)** β€” `async`/`await` borrow-checker hardening:
borrows must release before suspension points (ARIA-041), per-frame
loan tracking across `select!`/`join!`/`spawn`, K-Framework rules for
await suspension, 9-chapter `guide/async/` cookbook.
- **Phase 2 (v0.31.1.x)** β€” `trait` / `impl` / `dyn T` polish: dyn
dispatch through borrowed receivers, trait-method `$$i` / `$$m`
receivers, `dyn Trait` borrow rules (ARIA-042/043), trait-object
exhaustiveness, 9-chapter `guide/traits/` cookbook.
- **Phase 3 (v0.31.2.x)** β€” Special-value reconciliation: unified
`fixed` / `NIL` / `NULL` / `ERR` / `unknown`, `Result` + `fail`
end-to-end, exhaustiveness for special-value picks (ARIA-044/045/046),
K core proofs for Result `?`/`!` propagation, 7-chapter
`guide/special-values/` cookbook.
- **Phase 4 (v0.31.3.x)** β€” Cross-module summary visibility,
transitive ARIA-032 chains, RAII / Drop auto-emission for `wild`
bindings (ARIA-049, ARIA-050), array-bounds runtime check with
`--no-bounds-checks` opt-out, K proof depth-4 pin-address-stable.
- **Phase 5 (v0.31.4.x)** β€” Polish / QoL: ARIA-022 diagnostic hints
(W-01), guide cross-reference sweep, README refresh, cycle close.
- **v0.31.5.x β€” Handle per-binding auto-free (W-03)** β€” RAII
parity for per-`Handle` bindings: opting in via
`use "drop.npk".*;` now auto-emits `npk_handle_free(h)` for
every `Handle:h = HandleArena.alloc(a, N);` binding at scope
end, on top of the existing per-arena `npk_handle_arena_destroy`
(v0.29.5). Pass-move (`pass h`) skips the auto-free in the
originating frame (HANDLE-DEC-006). The original `ARIA-051`
warning (explicit `HandleArena.free(h)` on a RAII-managed
binding) was **promoted to a hard `ARIA-022` error and
retired in v0.31.6.4** once `nodrop` (W-04) provided a
precise per-binding opt-out. The fifth sentinel struct
`NitpickHandleRaii` lands in `stdlib/drop.npk` alongside its
per-region flag `handle_raii_enabled`.

**Current validation snapshot:** CTest **158/158** (release build,
excluding direct `k_semantics_*` aggregate wrappers);
`k_semantics_core` **201/201** under K Framework v7.1.320;
`k_semantics_proofs` **14/14** proof modules; **bug001 – bug712**
regression bug fixtures; **103 packages**; **74 stdlib modules**.

**v0.34.x highlights (this cycle):**
- **v0.34.0** β€” kickoff audit for the failsafe + DbC marathon;
FAILSAFE-DEC-001..005 and DBC-DEC-001..008 seeded.
- **v0.34.1** β€” `failsafe` endpoint hardening (`ARIA-068`), `!!!`
dispatch polish, `stdlib/failsafe_codes.npk`, and K core 193–194.
- **v0.34.2** β€” `exit` scope enforcement (`ARIA-069`) and proof #14
`failsafe-dispatch-proofs.k`; K core 195.
- **v0.34.3** β€” `requires` / `ensures` Z3 obligation locking,
`result` pseudo-variable scoping (`ARIA-070`), and K core 196–197.
- **v0.34.4** β€” `invariant` loop annotations with ARIA-071/072,
Z3 entry obligations, runtime debug checks, and K core 198.
- **v0.34.5** β€” hard `prove` obligations with ARIA-073/074,
automatic verification, `--debug-z3` SMT-LIB dumps, and K core 199.
- **v0.34.6** β€” CTFE-driven `assert_static` (`ARIA-075`),
`limit` compile-time and runtime locking (`ARIA-076`, failsafe
code 49), and K core 200–201.
- **v0.34.7** β€” `guide/dbc/` cookbook, README snapshot, and final
umbrella cycle audit.

**v0.33.x highlights (previous cycle):**
- **v0.33.0** β€” kickoff audit for the Result-handling marathon;
RESULT-DEC-001..014 seeded and stale docs/source drift identified.
- **v0.33.1** β€” `expr ? fallback` ratified as fallback unwrap,
nested explicit fallback locked, and `await work() ? fb` parser shape
fixed; K core 183–184.
- **v0.33.2** β€” `??` ratified as Optional/pointer null coalesce,
`?|` / `defaults` equivalence locked, and defaults precedence captured;
K core 185–186.
- **v0.33.3** β€” source-level `expr ?! fallback` ratified as emphatic
Result fallback unwrap, `?.` safe navigation returns Optional fields,
and Result receivers are rejected for `?.`; K core 187–188.
- **v0.33.4** β€” `_?` / `_!` desugar parity locked: `_?` is `drop`,
`_!` is `raw`; K core 189–190.
- **v0.33.5** β€” contextual `result catch (err) { handler }` implemented
end-to-end while preserving `catch` as a valid identifier; K core
191–192 and proof #13 added.
- **v0.33.6** β€” `guide/result/` cookbook, README snapshot, and final
umbrella cycle audit.

**v0.32.x highlights (previous cycle):**
- **v0.32.0** β€” kickoff audit for the pointer/cast marathon;
`POINTER-DEC-001`..`017` seeded.
- **v0.32.1** β€” `->` type + pointer-member expression audit; depth-3 chain
read/write/mixed-chain regressions and K core 176.
- **v0.32.2** β€” `<-` whole-dereference semantics; primitive/struct/expression
deref regressions and K core 177.
- **v0.32.3** β€” `@` address-of and pin alias matrix; stack/pin write-through
locks and K core 178–179.
- **v0.32.4** β€” checked cast warning matrix: `ARIA-062` narrowing,
`ARIA-063` signedness, `ARIA-064` float precision, plus
`@cast_unchecked` suppression and K core 180–181.
- **v0.32.5** β€” `stdlib/unsafe.npk`, `@ptr_add`, `@ptr_sub`,
`ARIA-065`/`ARIA-066` region policy, `ARIA-067 @NULL`, NULL failsafe
sentinel 46, generic wrapper hygiene, and K core 182.
- **v0.32.6** β€” FFI ABI docs, `guide/memory/pointers.md`, README snapshot,
and umbrella cycle audit.

**Previous v0.31.x highlights:**
- **v0.31.0.0–v0.31.0.7** β€” `async`/`await` borrow-checker (Phase 1).
- **v0.31.1.0–v0.31.1.8** β€” `trait` / `dyn T` polish (Phase 2).
- **v0.31.2.0–v0.31.2.11** β€” Special-value reconciliation (Phase 3).
- **v0.31.3.0–v0.31.3.10** β€” Cross-module / RAII / bounds-check (Phase 4).
- **v0.31.4.0–v0.31.4.2** β€” Polish / cycle-close (Phase 5).
- **v0.31.5.0–v0.31.5.4** β€” Handle per-binding auto-free (W-03).
- **v0.31.6.0–v0.31.6.4 β€” `nodrop` per-binding RAII opt-out (W-04)** β€” new
keyword threaded through lexer/parser/AST (NODROP-DEC-001/002/006/012),
IR-generator opt-out guard for all five RAII regions
(`wild` / `wildx` / `Handle` / `HandleArena` / JIT;
NODROP-DEC-003/004/005), outer-only rule
(`identity(nodrop f())` does **not** opt out; NODROP-DEC-011),
borrow-checker mirror keeping `ARIA-014` honest on `nodrop wildx`
bindings (NODROP-DEC-009/010), and **ARIA-051 retired** β€” the
redundant `HandleArena.free(h)` on a RAII-managed binding is now a
hard `ARIA-022` error whose hint recommends `nodrop` as the
per-binding escape hatch (NODROP-DEC-013). Five-slice cycle
(v0.31.6.0–v0.31.6.4); see
[AUDIT_v0.31.6.x.md](META/NITPICK/ROADMAP/0.31/AUDIT_v0.31.6.x.md).
- **v0.31.7.0–v0.31.7.6 β€” NLL Drop / last-use early-drop (W-07)** β€” new
function attribute `#[nll_drop]` retimes auto-emitted RAII drops from
lexical scope end to the **last-use point** of each enrolled binding
(NLL-DEC-001/003), computed by a real backward CFG
`LivenessAnalysis` (NLL-DEC-003/005/006; promoted from the previously
empty-mapped Gemini-Report stub at 5 back-edge merge sites,
`--dump-liveness` debug flag added in v0.31.7.2). Per-binding
`#[lexical_drop]` override keeps scope-end timing inside an
otherwise NLL-enabled function (NLL-DEC-002). IR-gen emission via
`DropEntry::consumed_` flag + last-use walker for all five RAII
regions (NLL-DEC-004/007/009/014; `pass v;` move skips the drop;
unwind walker skips consumed entries; borrow lifetimes tighten under
the attribute). Redundant-attribute diagnostic `ARIA-052` for
`#[nll_drop]` on a function with no RAII bindings
(NLL-DEC-013). K semantics ships parse-and-ignore (NLL-DEC-012):
3 new `FuncDecl` productions + 8 `loadFuncs` reduction rules + 3
core tests (152–154) cover the new grammar path; rationale is that
K already models drops at lexical scope end as the conservative
upper bound and RAII destructors are idempotent at-most-once within
a function. Seven-slice cycle (v0.31.7.0–v0.31.7.6); see
[AUDIT_v0.31.7.x.md](META/NITPICK/ROADMAP/0.31/AUDIT_v0.31.7.x.md).
- **v0.31.8.0–v0.31.8.5 β€” trait-method `$$i` return signatures + `from ` source-binding (W-13)** β€”
trait methods may now return `$$i`/`$$m` borrows; the borrow checker
resolves the return-borrow source parameter via a layered rule: an
explicit `from ` clause wins (TRAIT-RET-DEC-003); otherwise a
single borrow param is used (TRAIT-RET-DEC-002); otherwise a `self`
borrow is preferred on trait methods, falling back to the first borrow
param (TRAIT-RET-DEC-005). Dynamic dispatch through `dyn Trait` of a
return-borrow method is rejected (TRAIT-RET-DEC-007 / **ARIA-053**)
because the receiver identity needed to tie the returned borrow's
lifetime is erased by the fat-pointer dispatch. The `from` clause
validates against the parameter list: an unknown name is
**ARIA-055** (TRAIT-RET-DEC-008), a non-borrow named source stays
**ARIA-023**, and a `from` clause on a by-value return is
**ARIA-054** (warn, TRAIT-RET-DEC-009). K core grows three
runtime value-flow locks (tests 155–157) for the
single-source / explicit-`from r` / `self`-default paths;
full $$i return-type modeling in K is deferred. Six-slice cycle
(v0.31.8.0–v0.31.8.5); see
[AUDIT_v0.31.8.x.md](META/NITPICK/ROADMAP/0.31/AUDIT_v0.31.8.x.md).
- **v0.31.9.0–v0.31.9.6 β€” Phase-3 carryover residue (W-15)** β€”
three deferred Phase-3 surfaces folded back in: real `is unknown`
taint fold over a per-binding `mayBeUnknown` flag
(PHASE3-DEC-002/003/004), callee return-taint summary inferred from
`pass unknown` in body (PHASE3-DEC-005/006), reject assignment to a
`fixed` struct field while still allowing `$m` borrows of the
*other* fields (PHASE3-DEC-007/008/009 / **ARIA-056**), and the
declared return-flow marker `T?unknown` opting a callee into
the same `mayBeUnknown` propagation as a body-discovered `pass
unknown` (PHASE3-DEC-011/012/013). K core grows four runtime
tests (158–161) for the `unknown` surface keyword and
Int↔Unknown comparison rules (PHASE3-DEC-010); the two
compile-time-rejection items have no runtime artefact and are
intentionally not modeled in K. Six-slice cycle
(v0.31.9.0–v0.31.9.6); see
[AUDIT_v0.31.9.x.md](META/NITPICK/ROADMAP/0.31/AUDIT_v0.31.9.x.md).
- **v0.31.10.x–v0.31.14.x β€” extension cadence (deferred-item sweep)** β€”
five sub-cycles closing the remaining v0.31.x deferral queue:
v0.31.10.x (transitive ARIA-032 cross-module summary visibility),
v0.31.11.x (RAII / Drop on `JitFn` + JIT region polish),
v0.31.12.x (per-PID temp paths + cross-module sidecar interop),
v0.31.13.x (release-valve hint + test polish, RUN_SERIAL
stabilization), v0.31.14.x (closure capture for non-primitive
types β€” struct, `string`, `int64` handle, `$$i`/`$$m` borrows;
ARIA-060 `INVALID_CLOSURE_CAPTURE`, K core tests 170+171,
`guide/functions/closures.md`). See
[AUDIT_v0.31.10.x.md](META/NITPICK/ROADMAP/0.31/AUDIT_v0.31.10.x.md)
through
[AUDIT_v0.31.14.x.md](META/NITPICK/ROADMAP/0.31/AUDIT_v0.31.14.x.md).
- **v0.31.15.0–v0.31.15.4 β€” MACRO-007 complex code-gen macros
(final deferred item from v0.23.x)** β€” macros can now emit
multiple top-level declarations from one invocation, splice
fields into a `struct`, splice methods into an `impl`, and
carry template-literal interpolations with **hygiene**.
Splice surface is bare `name!(args);` with a three-token
parser lookahead (no new `%splice` keywords, MACRO2-DEC-001..003).
`MacroDeclStmt` and `MacroInvocationExpr` carry a
`definingScope_` pointer; `hygieneRewriteTemplateLiterals`
resolves each `&{ident}` interpolation in **both** the
defining scope and the caller scope, and emits
**ARIA-061 `MACRO_HYGIENE_VIOLATION`** (warning) when the two
scopes yield different `Symbol*` values
(MACRO2-DEC-004/005/007). `#caller(NAME)` is the documented
opt-out β€” parses as `UnaryExpr(#, Call("caller", [Ident]))`
and rewrites to a bare `&{NAME}` in the caller scope
(MACRO2-DEC-006). One latent `cloneAST` `TEMPLATE_LITERAL`
recursion bug discovered and fixed under this work
(MACRO2-DEC-008). K core grows two runtime value-flow locks
(tests 172 + 173) for the post-expansion shape; the expander,
hygiene walker, and ARIA-061 emit are C++-only per
MACRO2-DEC-010. Tests 170+171 from v0.31.14.x β€” which failed
K's `kparse` stage at original write-up β€” were also fixed in
this slice (literal suffixes stripped, lambda invocation
switched to `raw k(arg)` matching tests 121/124).
Five-slice cycle (v0.31.15.0–v0.31.15.4); see
[AUDIT_v0.31.15.x.md](META/NITPICK/ROADMAP/0.31/AUDIT_v0.31.15.x.md).
- **v0.31.16.0–v0.31.16.3 β€” K-Framework catch-up (final
extension sub-cycle)** β€” K-only cycle draining the
formal-model backlog so v0.32.x launches with the runtime
and K layers in sync. Closes **TRAIT-RET-DEC-011** (full K
modelling of `$$i T` as a return type, deferred from
v0.31.8.x): 3 new `FuncDecl` productions + 5 new
`loadFuncs` parse-and-elide rules into the existing
pass/fail/stmt-pass tables in `aria.k`, ratified by K core
tests 174 (zero-arg) and 175 (one-arg pass-through). Adds
K proof #12 **`nll-drop-idempotence-proofs.k`** (4 claims,
depth-4 stress) ratifying NLL-DEC-003 at the K level β€”
drops are idempotent on `` / `` /
``, so the NLL last-use point and the
conservative lexical-scope-end point produce identical K
configurations (KMOD-DEC-004). Slice 16.1 also rectified
a plan-doc drift: `pin-address-stable-proofs.k` was
claimed deferred but had actually landed at v0.27.4 /
v0.31.3.10 (KMOD-DEC-001); the cycle audit codifies
**R-3** as a binding process change β€” every future K
claim must cite `git log --oneline -- ` evidence.
No runtime, codegen, type-checker, or borrow-checker
changes; no new ARIA codes; no new bug fixtures. K
`` cell promotion remains rejected
(KMOD-DEC-005, reaffirms NLL-DEC-007). Four-slice cycle
(v0.31.16.0–v0.31.16.3); see
[AUDIT_v0.31.16.x.md](META/NITPICK/ROADMAP/0.31/AUDIT_v0.31.16.x.md).

See [AUDIT_v0.31.x.md](AUDIT_v0.31.x.md) and
[RELEASE_v0.31.x.md](RELEASE_v0.31.x.md) for the full cycle audit.

---

## Previous cycles

**Stable release: v0.25.7 β€” Borrow Checker Hardening complete (8-release cycle)**

The v0.25.x cycle delivered a comprehensive hardening of the borrow checker:
statement-visitor coverage, `defer` and early-exit handling, multi-dim and
nested array borrow paths, 3+-level struct field paths and `ptr->field`,
inter-procedural parameter intent and return-borrow lifetime, two-phase
borrows, `$$m self` in trait impls, closure-capture borrow tracking,
multi-await polish, secondary-span diagnostics, plus K-semantics test coverage
for multilevel field disjointness, two-phase release, and async release.
All 14 tracked BORROW items are resolved.

**Current validation snapshot:** CTest **53/53** passing (release build,
K semantics enabled); `k_semantics_core` **145/145** under K Framework v7.1.320;
`k_semantics_proofs` **10/10** proof modules; **204** regression bug tests
(bug001 – bug204, including 105 borrow-specific); **103 packages**;
**72 stdlib modules**.

**v0.25.x highlights (released this cycle):**
- **v0.25.0** β€” Statement-visitor audit + coverage matrix; `FAIL`/`TILL`
dispatch (BORROW-001).
- **v0.25.1** β€” `defer` body borrow tracking + early-exit leak audit
(BORROW-002, BORROW-003).
- **v0.25.2** β€” Multi-dim and nested array borrow paths (BORROW-004).
- **v0.25.3** β€” 3+-level struct field paths and `ptr->field` paths
(BORROW-005, BORROW-006).
- **v0.25.4** β€” Inter-procedural parameter intent and return-borrow
lifetime (BORROW-007, BORROW-008).
- **v0.25.5** β€” Two-phase borrows and `$$m self` in trait impls
(BORROW-009, BORROW-010).
- **v0.25.6** β€” Closure-capture borrow tracking, multi-await `$$m` polish,
ARIA-023 / ARIA-026 secondary spans (BORROW-011/012/013).
- **v0.25.7** β€” K semantics test coverage (3 new core tests),
9-chapter [`guide/borrow/`](https://github.com/alternative-intelligence-cp/nitpick-docs/tree/main/guide/borrow)
cookbook, and the [v0.25.7 audit](AUDIT_v0.25.7.md) closing the cycle.

**Stable release: v0.24.7 β€” Comptime / CTFE system complete (8-release cycle)**

The v0.24.x cycle delivered the full compile-time evaluation subsystem: pure
expression folding, comptime blocks, `comptime func:` declarations with
memoization, type intrinsics (`@sizeof`, `@alignof`, `@offsetof`, `@len`,
`@typeInfo`, `@fieldType`), `T: type` generic parameters, `limit`
short-circuit at comptime, `assert_static`, struct field reflection, and a
formal K-Framework model of the comptime layer. All 14 tracked COMPTIME items
are resolved.

**Current validation snapshot:** CTest **46/46** passing (release build,
K semantics enabled); `k_semantics_core` **142/142** under K Framework v7.1.320;
`k_semantics_proofs` **10/10** proof modules; **172** regression bug tests
(bug001 – bug172); **103 packages**; **72 stdlib modules**.

**v0.24.x highlights (released this cycle):**
- **v0.24.0–v0.24.2** β€” Comptime triage, `comptime(expr)` const folding,
`comptime { ... }` blocks with mutable locals, `comptime func:` with
memoization, `@sizeof`/`@alignof`/`@offsetof`/`@len` intrinsics, comptime
string operations.
- **v0.24.3–v0.24.4** β€” Macro Γ— comptime cooperation, `assert_static`,
comptime call-chain diagnostics, recursion budget enforcement.
- **v0.24.5** β€” Comptime generics: `T: type` parameters and type-level dispatch.
- **v0.24.6** β€” `limit` short-circuit at comptime; explicit
enforcement of comptime limitations (no I/O, GC, extern, async, threading,
pinning, RNG, time).
- **v0.24.7** β€” Struct field reflection (`@typeInfo(T).fields.`,
`@fieldType(T, "f")`), K semantics for the comptime layer (3 new K core
tests, `` configuration cell), 9-chapter
[`guide/comptime/`](https://github.com/alternative-intelligence-cp/nitpick-docs/tree/main/guide/comptime)
documentation, and the [v0.24.7 audit](AUDIT_v0.24.7.md) closing the cycle.

**Catching up β€” major series since the last GitHub release on `main` (v0.17.5):**
- **v0.18.x** β€” K Framework executable semantics seed; KLEE symbolic execution;
Juliet CWE corpus; bounded safety hardening.
- **v0.19.x** β€” Array, struct, and borrow-checker polish; loop-body borrow
checking; K semantics through 127 core tests.
- **v0.20.x** β€” Diagnostics & warning system polish, preprocessor hardening,
Display trait, closure lifetimes, `optional`.
- **v0.21.x** β€” Audit-driven follow-ups: cfg compilation, `derive(Display)`,
async borrow checking, `Rules`/Z3 disjointness, ICE quality, AArch64 JIT
diagnostics, K `tbb8`/`tbb16`/`tbb64`, K `async`/`await`.
- **v0.22.x** β€” Port-driven polish (CHIP-8, jsmn, Brainfuck): `get_argc`/
`get_argv` builtins, `break`/`continue`, pick on integers, bitwise ops,
string escape sequences, reserved-keyword diagnostics.
- **v0.23.x** β€” Full macro system: hygiene, recursion + depth guard, variadic
macros, statement-position invocations, built-in macros (`assert!`, `todo!`,
`unreachable!`, `cfg!`), `--expand-macros` flag, K semantics for macros.
- **v0.24.x** β€” Comptime / CTFE system.
- **v0.25.x** β€” Borrow Checker Hardening (this release).

**Previous series highlights:**
- **v0.17.x** β€” Installers, packaging, and distribution: enhanced `install.sh`,
Debian `.deb` builder, RPM builder, `aria-pkg` remote fetch from GitHub.
- **v0.16.x** β€” Full compiler/runtime/tooling audit: 0 TODO/FIXME/HACK in C++
source, 72 stdlib modules audited, 33 examples tested, 171-page manual
regenerated, **800K+ fuzz tests** with 0 crashes.
- **v0.15.x** β€” Self-hosting: 12 compiler/tool modules ported to Aria (lexer, parser, type checker, borrow checker, safety checker, exhaustiveness, const evaluator, module resolver, doc generator, package manager, project config), final census
- **v0.14.x** β€” SMT solver expansion: contract proofs, range inference, data race analysis, fast-paths, documentation
- **v0.13.x** β€” Traits, enums, generics, deferred language features, @ function pointers, 234-page PDF manual, final audit (959 tests, 17h+ fuzzing)
- **v0.12.x** β€” Networking & middleware: HTTP, DNS, socket, server, URL, cookie, CORS, body-parser, session, static, rate-limit, FTP, SMTP, WebSocket, display, input, LRU, glob, retry
- **v0.11.x** β€” Threading & concurrency: thread pool, atomics, lock-free structures, channels, mutex/rwlock/barrier, arena/pool/slab allocators, shared memory, IPC, signal handling, AIFS, AriaX kernel mods
- **v0.7.x** β€” JIT: 45+ x86-64 instructions, linear scan register allocator, peephole optimizer, WildX security, 0.66x native C -O2
- **v0.5.x** β€” Z3 SMT formal verification: contracts, overflow proofs, concurrency/memory safety verification
- **v0.3.x–v0.4.x** β€” Ecosystem packages, Z3 Phase 1–3, AriaX kernel mods

---

## Compiler Toolchain

| Tool | Status | Description |
|---|---|---|
| `npkc` | βœ… Stable | Full compiler, LLVM 20 backend (`ariac` is a compat alias) |
| `aria-ls` | βœ… Stable | Language Server β€” hover, goto-definition, completion, documentSymbol, references, signatureHelp |
| `npkpkg` | βœ… Stable | Package manager β€” install, search, pack, 103 packages verified |
| `aria-doc` | βœ… Stable | Documentation generator β€” 435 unique HTML pages from ecosystem |
| `aria-mcp` | βœ… Stable | MCP server β€” compile, safety audit, docs search, format, specialist model |
| `aria-safety` | βœ… Stable | Static safety auditor β€” 11 checks including UNSAFE, EXTERN, CAST, TODO; `--json` output |
| Z3 Verifier | βœ… Stable | SMT-based formal verification β€” contracts, overflow, concurrency, memory safety, `prove`/`assert_static`, `--smt-opt` |
| K semantics | βœ… v0.18.x seed | Executable formal semantics seed β€” `kompile`/`krun` core oracle, `kprove` proof hook, CTest integration, 109/109 core tests, 10/10 proof modules |
| `aria-dap` | βœ… Stable | Debug Adapter Protocol β€” LLDB 20 backend, conditional breakpoints, logpoints |
| `npkbld` | βœ… Stable | Build system β€” project manifest, dependency resolution, test runner |
| `install.sh` | βœ… Stable | One-command build + install with prerequisite checking |
| Fuzzer V2 | βœ… Active | 27 generators, 100% compile rate, zero unresolved crashes |
| Specialist model | βœ… V6+SMT | Qwen 7B LoRA, v6 corpus + v7 SMT verification examples |
| Linux packages | βœ… Stable | Debian `.deb` and RPM builders, plus source/install-script paths |
| AriaX Linux | πŸ”§ In progress | Custom distro with full toolchain |
| `aria_packages` | βœ… Active | 103 packages, all passing |
| PDF Manual | βœ… v1.1 | [171-page programming manual](https://github.com/alternative-intelligence-cp/aria-docs/releases/tag/v0.16.11) β€” specs, guide, safety walkthrough, reference |

---

## Language Features

### Stable
- **All primitive types** β€” int1/2/4/8/16/32/64/128/256/512/1024/2048/4096, uint1/2/4/8/16/32/64/128/256/512/1024/2048/4096, flt32/64/128/256/512, bool, string
- **TBB Types (tbb8/16/32/64)** β€” Symmetric signed integers with overflow sentinel (-128/ERR)
- **TFP TYPES (tfp16/32)** β€” Twisted Floating Point
- **any** β€” type erased pointer, equivalent to void* in C
- **Balanced Ternary/Nonary Literals & Runtime** β€” `0t[01T]+` and `0n[01234ABCD]+` syntax, full trit/tryte/nit/nyte arithmetic
- **Quantum Types (Q3/Q9/Q21)** β€” Gradient thinking: two-hypothesis superposition with confidence levels and crystallization thresholds
- **Generic Functions and Structs** β€” Monomorphization with type inference
- **Result Types** β€” `pass`/`fail` with `?` propagation and `!` unwrap, `Result` signatures, `_?`/`_!` shorthand operators
- **`fail()` from user functions** β€” Result-style: `fail(err)` produces `Result{error:err, is_error:true}`, complement to `pass(val)`
- **Layered Safety** β€” `?!` (checked), `!!!` (unchecked), `unknown`/`ok()`, `failsafe`
- **Async/Await** β€” LLVM coroutine-based with promise mechanism for error propagation through async boundaries
- **All loop forms** β€” `while`, `for(;;)` (C-style), `for (i in a..b)` (range), `loop`, `till`, `when/then/end`
- **Control flow** β€” `if/else`, `pick` (exhaustive match), `break`, `continue`, `fall`
- **Module system** β€” `use`, `mod`, `pub`, `extern`
- **Closures** β€” First-class functions with capture
- **Z3 Formal Verification** β€” SMT-based compile-time proofs: contracts (`requires`/`ensures`), overflow elimination, data race detection, deadlock detection, use-after-free proofs, `prove`/`assert_static` builtins, `--smt-opt` optimizations, configurable `--smt-timeout`
- **Borrow checker** β€” Compile-time memory safety analysis
- **Arrays in structs** β€” Fixed-size scalar and struct array fields with nested member access
- **SIMD types** β€” Vector arithmetic via LLVM intrinsics
- **Atomic types** β€” Lock-free concurrent primitives
- **Dimensional algebra** β€” Unit-typed arithmetic
- **NIL/void separation** β€” NIL is Aria's unit type (wrapped in `Result`), void restricted to extern blocks, bridge via pointer erasure
- **NIL/NULL separation** β€” NIL for no value, NULL for no reference
- **Operators** β€” Full suite including `+` (string concatenation), `@` (address), `#` (pin), `->` (arrow), `..`/`...` (ranges)
- **Template literals** β€” `` `&{variable}` `` string interpolation
- **Six-stream I/O** β€” stdin/stdout/stderr/stddbg/stddati/stddato with runtime initialization, graceful fallback, `stdin_read_all()` and `stdin_read_line()` builtins
- **sys() syscall interface** β€” Three-tier direct Linux syscall invocation (`sys`/`sys!!`/`sys!!!`) with compile-time safety whitelist, Result wrapping, and TOS escalation integration
- **Traits** β€” Definition, implementation, UFCS on primitive types, `dyn Trait` vtable dispatch, trait bounds on generics
- **Optional types** β€” `T?` with `??` nil-coalescing, `?.` safe navigation; working for primitives and custom types
- **Async channels & actors** β€” Buffered/unbuffered/oneshot channels, actor spawn/send/stop, fan-out/fan-in/pipeline patterns
- **Standard library** β€” string_convert, string (manipulation), string_builder, print_utils, wave/wavemech, complex, dbug, quantum, atomic, io (file streams), math (transcendentals), linalg (linear algebra), collections (Vec, Map, Set, Graph), json, toml, binary, net (TCP sockets)

### In Progress / Specified
- **AriaX Linux** β€” Custom distro with full toolchain pre-installed
- **Specialist model V7** β€” Next training corpus covering v0.16.x additions

---

## `aria-packages` Library Ecosystem

All packages live in the separate [`aria-packages`](https://github.com/alternative-intelligence-cp/aria-packages) repository. 103 packages total, organized into utility, graphics/game, server, database, and AI/ML tiers. Each package has a `src/` module, a `tests/` file with assertions, and where FFI is needed, a C `shim/`.

**Package tiers:**

| Package | Description |
|---------|-------------|
| aria-actor | Extended actor patterns (pool, router, supervisor) |
| aria-aifs | AI filesystem utilities (POSIX ops + metadata tagging) |
| aria-args | Command-line argument parsing |
| aria-ascii | ASCII character classification and conversion |
| aria-audio | Software synthesis, MIDI note table, ALSA backend |
| aria-base64 | Base64 encoding/decoding |
| aria-bench | Benchmarking |
| aria-bigdecimal | Arbitrary precision decimal arithmetic |
| aria-bits | Bit test/set/clear/flip, nibble extraction, popcount |
| aria-body-parser | HTTP body parsing middleware (JSON, URL-encoded, multipart) |
| aria-buf | Byte/word packing for uint64 buffers |
| aria-channel | High-level channel patterns (fan-out, fan-in, pipeline) |
| aria-clamp | min, max, clamp, abs, sign for int64/uint64 |
| aria-cli | Enhanced CLI parsing with subcommands |
| aria-color | RGBA packing/unpacking and pixel transforms |
| aria-compress | Data compression (LZ4/zstd via FFI) |
| aria-console | 16-bit memory-mapped address space + 60fps frame scheduler |
| aria-conv | Saturating narrowing and float/int conversion |
| aria-cookie | Cookie parsing and Set-Cookie builder |
| aria-cors | CORS middleware with configurable origins |
| aria-crypto | Cryptographic primitives (SHA-256, AES, HMAC via FFI) |
| aria-csv | CSV parsing and generation |
| aria-cuda | CUDA FFI: device management, memory ops, kernel launch, cuBLAS |
| aria-datetime | Date/time formatting and arithmetic |
| aria-decision-t | Decision tree classifier (entropy, information gain) |
| aria-diff | Text diffing |
| aria-display | ANSI/termios terminal rendering (virtual console) |
| aria-dns | DNS resolution |
| aria-editor | Terminal-mode text editor with search |
| aria-endian | Big/little-endian byte-swap for 16/32/64-bit |
| aria-entangled | Quantum-inspired entangled variable pairs |
| aria-env | Environment variable access and process info |
| aria-fixed | Q32.32 fixed-point arithmetic on uint64 |
| aria-freq | Frequency/period/baud integer arithmetic |
| aria-fs | File system utilities (stat, mkdir, readdir, copy) |
| aria-ftp | FTP client session management |
| aria-gml | GML compatibility layer: 40+ functions, xorshift32 RNG |
| aria-gradient-field | 3D gradient field computation |
| aria-gtk4 | GTK4 desktop GUI: widget registry, events, non-blocking UI |
| aria-hash | FNV-1a and djb2 string hashing |
| aria-hex | Hexadecimal encoding/decoding |
| aria-http | HTTP client (GET/POST requests) |
| aria-ini | INI config file parsing |
| aria-input | Raw keyboard input with SNES-style button mapping |
| aria-jamba | Hybrid Transformer + Mamba + Mixture of Experts model |
| aria-jit | WildX JIT helpers |
| aria-json | JSON encoding for basic types |
| aria-libc | Standard C library wrappers |
| aria-log | Structured logging with severity levels |
| aria-looping | Iterative refinement model with convergence stopping |
| aria-mamba | Mamba selective state space model with SiLU gating |
| aria-map | Map data structure |
| aria-math | Trig, exp, log, rounding via C libm |
| aria-matrix | Matrix operations |
| aria-mime | MIME type detection and mapping |
| aria-mock | Test mocking framework |
| aria-msgpack | MessagePack binary serialization |
| aria-mux | Bit-select, field insert/extract, mask ops, blend |
| aria-mysql | MySQL/MariaDB client via libmysqlclient |
| aria-opengl | OpenGL 3.3 Core via GLAD + SDL2 |
| aria-path | Path manipulation |
| aria-postgres | PostgreSQL client via libpq (parameterized, LISTEN/NOTIFY) |
| aria-pqueue | Priority queue (min-heap) |
| aria-qt6 | Qt6 Widgets GUI toolkit bindings |
| aria-queue | Queue data structure |
| aria-rand | xorshift64 pseudo-random number generator |
| aria-rate-limit | Token bucket rate limiting middleware |
| aria-raylib | raylib v6.0 bindings: window, drawing, shapes, text, input, audio, gamepad |
| aria-redis | Redis client via hiredis (strings, lists, hashes, sets) |
| aria-regex | Regular expression matching |
| aria-resource-mem | RAII-style resource lifecycle management |
| aria-ringbuf | Ring buffer (circular buffer) |
| aria-router | Express-style router: path params, middleware, wildcards |
| aria-rules-common | Commonly used Rules declarations |
| aria-sdl2 | SDL2 multimedia bindings: window, renderer, drawing, events |
| aria-sdl3 | SDL3 bindings |
| aria-semver | Semantic versioning: parse, compare, satisfy |
| aria-server | HTTP/1.1 server: listen, accept, parse, respond |
| aria-session | In-memory session management with crypto IDs |
| aria-smtp | SMTP email composition |
| aria-socket | Socket abstraction layer |
| aria-sort | Various sorting algorithms |
| aria-sqlite | SQLite3 embedded database client (parameterized queries) |
| aria-static | Static file serving with MIME detection and path traversal protection |
| aria-stats | Statistics functions |
| aria-str | String utilities (pad, trim, repeat, contains, split) |
| aria-template | String template rendering with variable substitution |
| aria-tensor | Dense tensor library: creation, arithmetic, matmul, activations, GPU interop |
| aria-test | Test framework with assertion helpers |
| aria-tetris | Full Tetris clone: sound effects, gamepad, high score |
| aria-toml | TOML configuration file parsing |
| aria-transformer | Transformer encoder: multi-head attention, causal masking |
| aria-uacp | Universal AI Communication Protocol: binary framing, 8 message types |
| aria-url | URL parsing, encoding, query string manipulation |
| aria-uuid | UUID v4 generation and formatting |
| aria-vec | 2D/3D float64 vector math (dot, cross, length) |
| aria-websocket | WebSocket client/server (RFC 6455) |
| aria-webkit-gtk | WebKitGTK web content bindings |
| aria-wxwidgets | wxWidgets GUI toolkit bindings |
| aria-xml | XML parsing and generation |
| aria-yaml | YAML parsing and serialization |
| aria-zigzag | Zigzag encode/decode for signed integer interleaving |

---

## Overview

Aria is a systems programming language that reimagines I/O and type systems for AI-native applications. Inspired by Nikola Tesla's vision of interconnected systems, Aria introduces **six-stream I/O** where programs communicate through stdin, stdout, stderr, stddbg, stddati, and stddato β€” separating human-readable, debug, and machine-readable data at the language level.

The language is being built as the primary substrate for **Nikola**, a consciousness architecture based on the Asymmetric Toroidal Phase Model (ATPM). Aria's features β€” balanced types, deterministic arithmetic, explicit memory lifecycle, and quantum superposition types β€” are not arbitrary; they are requirements of the Nikola model.

### Research Foundation

- **ATPM (Asymmetric Toroidal Phase Model):** DOI [10.5281/zenodo.18158226](https://doi.org/10.5281/zenodo.18158226)
- **ATPM Extended:** DOI [10.5281/zenodo.18168992](https://doi.org/10.5281/zenodo.18168992)
- **Ego-Mediated Behavior Study:** DOI [10.5281/zenodo.18159274](https://doi.org/10.5281/zenodo.18159274)
- **Nikola Model Architecture:** DOI [10.5281/zenodo.18159162](https://doi.org/10.5281/zenodo.18159162)
- **Design rationale** (non-physicist version): [docs/ATPM_DESIGN_RATIONALE.md](docs/ATPM_DESIGN_RATIONALE.md)

---

## Key Language Features

### Layered Safety System

Aria's safety philosophy: make dangerous operations **explicit**, provide multiple layers for error handling, and never let a program crash silently.

**Layer 1: Failsafe** β€” Every Aria program has a `failsafe` that catches unhandled errors:
```aria
func:failsafe = int32(tbb32:err) {
// Log, cleanup, graceful shutdown
exit(1);
};
```

**Layer 2: Result Types** β€” Explicit error propagation with concise syntax:
```aria
func:divide = int32(int32:a, int32:b) {
if (b == 0i32) { fail(-1i32); }
pass(a / b);
};

int32:result = divide(10i32, 2i32) ? 0i32; // Unwrap with default
```

**Layer 3: Unknown/Ok Pattern** β€” Explicit null safety without null types:
```aria
int32:maybe_valid = unknown;
if (some_condition) {
maybe_valid = 42i32;
ok(maybe_valid); // Mark as valid
}
// ok() returns the value itself β€” use wherever the value is needed
int32:safe_val = ok(maybe_valid);
```

**Layer 4: TBB Overflow Detection** β€” Symmetric integers with error sentinels:
```aria
tbb8:x = 120tbb8;
tbb8:y = 10tbb8;
tbb8:result = x + y; // Overflow: result = ERR (-128)
tbb8:err = -128tbb8;
if (result == err) {
drop(println("Overflow detected!"));
}
```

**Layer 5: Z3 SMT Formal Verification** β€” Compile-time mathematical proofs via Z3 solver:
```aria
// Design-by-Contract: requires/ensures are verified at compile time
func:safe_divide = int32(int32:a, int32:b)
requires b != 0i32
ensures $ >= 0i32
{
pass(a / b);
};

// Integer overflow proofs: Z3 bitvector analysis proves absence of overflow
func:safe_add = int32(int32:a, int32:b)
requires a > 0i32, a < 1000i32, b > 0i32, b < 1000i32
{
pass(a + b); // Z3 proves: no overflow possible in int32 range
};
```
```bash
# Verify contracts and overflow safety at compile time
npkc program.npk --verify-contracts --verify-overflow --verify-report -o program
```
Aria uses the Z3 SMT solver to mathematically *prove* the absence of contract violations and arithmetic overflow across all possible execution paths β€” the same class of static formal verification used by Ada/SPARK for safety-critical aerospace and automotive systems.

### For Loops β€” Two Forms

```aria
// C-style: precise control
for(int32:i = 0i32; i < 10i32; i += 1i32) {
drop(println(int32_toString(i)));
}

// Range-based: clean iteration
for (i in 1..10) { // inclusive: 1, 2, ..., 10
drop(println(int64_toString(i)));
}
for (i in 1...10) { // exclusive: 1, 2, ..., 9
drop(println(int64_toString(i)));
}
for (int32:i in 0...5) { // with explicit type annotation
drop(println(int32_toString(i)));
}
```

> Note: `i++` is not supported. Use `i += 1i32` or `i = i + 1i32`.

### TBB Types β€” Symmetric Signed Integers

```aria
tbb8:x = 120tbb8;
tbb8:y = 10tbb8;
tbb8:result = x + y; // Overflow: result = ERR (-128)
tbb8:err = -128tbb8;
if (result == err) {
drop(println("Overflow detected!"));
}

// Sticky error propagation
tbb8:sum = result + x; // ERR + anything = ERR
```

### Quantum Types β€” Gradient Thinking

Quantum types track two hypotheses simultaneously with confidence levels, crystallizing to a definite value when evidence accumulates. Three granularity levels: Q3 (ternary), Q9 (nonary), Q21 (21-state with saturation barriers).

```aria
use "stdlib/quantum.aria".*;

// Q3: Simple 3-state confidence (trit: -1, 0, +1)
Q3:sensor = {a: 20i32, b: 25i32, c: 0}; // Two hypotheses, unknown confidence

// Both hypotheses evolve together
Q3:updated = {a: sensor.a + 5i32, b: sensor.b + 5i32, c: 1};

// Crystallize when confident
int32:result = 0i32;
if (updated.c > 0) { result = updated.b; } // Evidence favors B β†’ 30
if (updated.c < 0) { result = updated.a; } // Evidence favors A β†’ 25

// Q9: 9-state confidence (nit: -4 to +4) for finer gradients
Q9:decision = {a: 100i32, b: 200i32, c: -3}; // Moderately favor A

// Q21: 21-state confidence (tbb8: -10 to +10, saturation barriers at Β±6)
Q21:complex = {a: 42i32, b: 84i32, c: 8}; // Past barrier, crystallizable
```

### Balanced Ternary Literals (Syntax Complete)

```aria
int64:six = 0t1T0; // 1Γ—9 + (-1)Γ—3 + 0Γ—1 = 6
int64:neg_one = 0tT; // -1
int64:four = 0n4; // balanced nonary: 4
int64:neg_four = 0nD; // -4
```

---

## Quick Start

### One-Command Install

```bash
git clone https://github.com/alternative-intelligence-cp/aria.git
cd aria
./install.sh # build + install to /usr/local
```

The install script checks prerequisites, builds all tools, and installs binaries, stdlib, and man pages. Options:

```bash
./install.sh --build-only # build without system install
./install.sh --prefix=$HOME/.local # install to custom prefix
./install.sh --install-deps # auto-install missing packages
./install.sh --uninstall # remove installed files
```

### Package Install

```bash
# Debian / Ubuntu / Mint
sudo dpkg -i aria-lang_*_amd64.deb

# Fedora / RHEL
sudo rpm -ivh aria-lang-*.x86_64.rpm
```

Build packages with `./packaging/build-deb.sh` or `./packaging/build-rpm.sh`.

See [INSTALL.md](INSTALL.md) for all installation methods.

### Manual Build

```bash
mkdir -p build && cd build
cmake ..
cmake --build . -j$(nproc)
cd ..
```

### Hello World

```bash
cat > hello.npk << 'EOF'
func:main = int32() {
drop(println("Hello from Nitpick!"));
exit(0);
};
func:failsafe = int32(tbb32:err) { exit(1); };
EOF

./build/npkc hello.npk -o hello
./hello
```

```bash
# Compile options
./build/npkc program.npk -o program # compile
./build/npkc program.npk --emit-llvm -o out.ll # LLVM IR
./build/npkc program.npk -O2 -o program # optimized
./build/npkc program.npk --emit-wasm -o out.wasm # WebAssembly
```

### Linking Standard Library Dependencies

Certain standard library modules (like `io.npk`, `string.npk`, and `math.npk`) depend on external C shim libraries provided by the `aria-libc` (or `nitpick-libc`) package. When compiling a program that imports these modules natively with `npkc`, you must explicitly pass the linker flags for these shared objects:

```bash
# Example: Compiling word_count.npk which uses io.npk and string.npk
./build/npkc word_count.npk -o word_count -L/path/to/aria-libc/shim -laria_libc_io -laria_libc_string -laria_libc_mem
```

*Note: If you use the `test-all.sh` script or the `aria-pkg` manager, these dependencies are automatically parsed from `nitpick-package.toml` and linked for you.*

**Prerequisites:** LLVM 20.1+, CMake 3.20+, C++17 compiler, Python 3.8+, Linux/macOS/WSL2

---

## Documentation

πŸ“š **[aria-docs](https://github.com/alternative-intelligence-cp/aria-docs)** β€” Package reference, language guides, and tutorials (separate repo).

πŸ“– **[Aria Programming Manual v1.1 (PDF)](https://github.com/alternative-intelligence-cp/aria-docs/releases/tag/v0.16.11)** β€” 171-page offline manual: specs cheat sheet, full programming guide, safety walkthrough, and reference appendix.

**Quick links in aria-docs:**
- `guide/` β€” Full programming guide (12 sections)
- `reference/` β€” Language reference (20+ documents)
- `safety-walkthrough/` β€” Safety system walkthrough
- `packages/` β€” API reference for all packages

**Man pages:** Install with `./install.sh` β€” then `man aria-control-flow-for`, `man aria-types-int32`, etc.
**Language spec:** [`.internal/aria_specs.txt`](.internal/aria_specs.txt)
**Compiler architecture:** [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md)

---

## Project Structure

```
aria/
β”œβ”€β”€ .github/ # CI/CD and GitHub templates
β”‚ β”œβ”€β”€ workflows/ # GitHub Actions (build + test)
β”‚ └── ISSUE_TEMPLATE/ # Bug report, feature request, crash report
β”œβ”€β”€ src/ # Compiler source
β”‚ β”œβ”€β”€ frontend/ # Lexer, parser, AST, semantic analysis
β”‚ β”œβ”€β”€ backend/ # LLVM IR generation
β”‚ └── runtime/ # Runtime support (GC, strings, async, streams)
β”œβ”€β”€ include/ # Headers
β”œβ”€β”€ stdlib/ # Standard library (.aria files)
β”œβ”€β”€ tests/ # Test suite
β”‚ β”œβ”€β”€ regression/ # Regression tests
β”‚ β”œβ”€β”€ fuzz/ # Fuzzer V2 and corpus
β”‚ β”œβ”€β”€ gpu/ # GPU/CUDA tests
β”‚ └── misc/ # Exploratory/scratch tests and archived test results
β”œβ”€β”€ examples/ # Example programs
β”œβ”€β”€ docs/ # Design docs and architecture
β”œβ”€β”€ k-semantics/ # K Framework executable semantics and core tests
β”œβ”€β”€ scripts/ # Build and maintenance scripts
β”œβ”€β”€ tools/ # Development tooling (specialist model, semantic_db)
β”œβ”€β”€ benchmarks/ # Performance benchmarks
β”œβ”€β”€ runtime/ # Runtime C source
β”œβ”€β”€ vendor/ # Vendored dependencies
β”œβ”€β”€ third_party/ # Third-party components
β”œβ”€β”€ debian/ # Debian packaging
β”œβ”€β”€ .internal/ # Internal: spec, session notes, status docs
β”œβ”€β”€ build/ # Build artifacts (gitignored)
β”œβ”€β”€ CMakeLists.txt
β”œβ”€β”€ README.md
β”œβ”€β”€ SAFETY.md
β”œβ”€β”€ CHANGELOG.md
β”œβ”€β”€ CONTRIBUTING.md
└── LICENSE.md
```

**Related repositories:**
- [`aria-packages`](https://github.com/alternative-intelligence-cp/aria-packages) β€” 103 library packages
- [`aria-docs`](https://github.com/alternative-intelligence-cp/aria-docs) β€” reference docs, guides, and [171-page PDF manual](https://github.com/alternative-intelligence-cp/aria-docs/releases/tag/v0.16.11)
- [`ariax`](https://github.com/alternative-intelligence-cp/ariax) β€” POSIX tools and AX Linux distro
- [`aria-lang`](https://github.com/alternative-intelligence-cp/aria-lang) β€” VS Code extension
- [`aria-make`](https://github.com/alternative-intelligence-cp/aria-make) β€” build system

---

## Testing

```bash
# Run regression tests
./tests/regression/run_regression.sh

# Run the full test suite
./scripts/run_comprehensive_tests.sh

# Run K executable-semantics core tests (requires K Framework)
./k-semantics/run_k_tests.sh --require-k

# Run fuzzer
cd tests/fuzz && python3 fullstack_fuzzer.py

# Single test
./build/npkc tests/some_feature.npk -o /tmp/t && /tmp/t
```

Test results are archived in `test_results/` for regression tracking. The fuzzer archives crashes in `tests/fuzz/crashes_archive/`.

---

## Development Roadmap

### v0.1.0 β€” Released

- βœ… Full compiler toolchain (ariac, aria-lsp, aria-dap, aria-doc, aria-pkg)
- βœ… Layered safety system (?!, !!!, unknown/ok(), failsafe)
- βœ… Quantum types (superpose/collapse)
- βœ… TBB types with sticky overflow sentinels
- βœ… Full generic system (functions + structs, monomorphization)
- βœ… Both for loop forms (C-style and range-based)
- βœ… Borrow checker (compile-time memory analysis)
- βœ… SIMD and atomic types
- βœ… Dimensional algebra
- βœ… 678 compiler tests, Fuzzer V2, Valgrind-clean runtime
- βœ… 27 `aria_packages` libraries with 543+ assertions (all passing)
- βœ… All 27 compiler bugs found, fixed, verified
- βœ… Full documentation (web, man pages, programming guide, Getting Started)

### v0.2.0 β€” Released

- βœ… **Self-hosting compiler frontend** β€” Lexer, parser, type checker, borrow checker, safety checker, exhaustiveness checker, and const evaluator ported to Aria (220 tests across 5 modules)
- βœ… **stdlib expansion** β€” 9 modules (io, math, linalg, collections, string, json, toml, binary, net) with 290+ passing tests
- βœ… **7 additional codegen bugs fixed** β€” Inline return comparison, string concatenation, pass() unwrapping, pointer reassignment, NIL comparison, cross-module pointer corruption
- βœ… **Improved compiler diagnostics** β€” "Did you mean?" suggestions, accurate source locations for all type errors
- βœ… **License changed to Apache 2.0**
- βœ… **Language specialist model** V3 complete (71% pattern match), V4 in progress

### v0.2.2 β€” Released

- βœ… **GUI toolkit wrappers** β€” Idiomatic Aria bindings for raylib (20 tests), SDL2 (19 tests), GTK4 (20 tests) via C shim pattern
- βœ… **9 utility libraries** β€” aria-test, aria-csv, aria-log, aria-base64, aria-datetime, aria-regex, aria-fs, aria-socket, aria-http (166 tests, all passing)
- βœ… **Tooling improvements** β€” aria-ls (documentSymbol, references, signatureHelp), aria-mcp (format tool, resources), aria_make (test command), aria-dap (conditional breakpoints, logpoints), aria-safety (4 new checks, --json)
- βœ… **Debian packaging** β€” `aria_0.2.2-1_amd64.deb` (17 MB), tested on Linux Mint 22.3
- βœ… **Repository reorganization** β€” Monorepo split into 10 repos under `alternative-intelligence-cp` org
- βœ… **V5 specialist corpus** β€” 2,688 examples covering all v0.2.2 additions
- βœ… **Extended fuzzing** β€” 48-hour adversarial campaign, zero unresolved crashes

### v0.2.3 β€” Released

- βœ… **Database client libraries** β€” 4 packages: aria-sqlite (34 assertions), aria-postgres (40 assertions), aria-mysql (44 assertions), aria-redis (53 assertions)
- βœ… **Parameterized queries by default** β€” All SQL drivers use parameter binding; SQL injection tests pass on all 3 SQL drivers
- βœ… **Full CRUD + transactions** β€” Insert, select, update, delete, begin/commit/rollback across all drivers
- βœ… **PostgreSQL LISTEN/NOTIFY** β€” Async notification support
- βœ… **Database guide** β€” `aria-packages/DATABASE_GUIDE.md` with prerequisites, patterns, and API reference
- βœ… **V6 specialist model** β€” Updated corpus covering database additions

### v0.2.4 β€” Released

- βœ… **Async/await error propagation** β€” Promise-based `Result` through coroutine boundaries, fixed dual await paths, proper memory management, Valgrind-clean
- βœ… **`fail()` from user functions** β€” Result-style mechanism: `fail(err)` is complement to `pass(val)`, no more sentinel workarounds
- βœ… **Arrays in structs fixed** β€” Nested member access (`cloud.pts[0].x`) for read and write, Aria element type registration
- βœ… **Balanced ternary/nonary runtime** β€” Full trit/tryte arithmetic (add, sub, mul, div, mod), 15/15 tests
- βœ… **NIL ↔ void bridge** β€” NIL = Aria unit type, void = C ABI only, pointer erasure bridge
- βœ… **Code quality pass** β€” 44 deprecated LLVM API migrations, all warnings fixed, zero Aria-source warnings
- βœ… **Traits & borrow semantics RFC** β€” Design doc for monomorphized traits + `$$i`/`$$m` borrow qualifiers
- βœ… **6 regression tests** β€” Dedicated regression suite covering critical bug fixes

### v0.2.1.1 β€” Released

- βœ… **aria-dap debugger** β€” Full DAP server with LLDB 20 backend. Breakpoints, stepping, stack traces, variable inspection.
- βœ… **`-g` flag** β€” DWARF debug info generation with proper source paths, variable locations, and subprogram entries.
- βœ… **VS Code debugging** β€” Debug configuration provider, auto-compile, launch.json snippets, `aria.debugger.path` setting.
- βœ… **O0 for debug** β€” Automatically disables LLVM optimization when `-g` is set to preserve variable visibility.

### v0.2.1 β€” Released

- βœ… **aria-pkg fixed** β€” Registry loading, metadata parsing, tarball extraction; added search/pack/directory-install. 27/27 packages verified.
- βœ… **aria-doc fixed** β€” Parser rewritten for Aria colon syntax. Generates 435 unique HTML pages, zero `unknown.html` collisions.
- βœ… **aria-ls wired** β€” AST-based hover (type signatures + builtin descriptions), goto-definition, completion (37 keywords + 15 types + file symbols).
- βœ… **install.sh** β€” One-command build and install with prerequisite checking, `--prefix`, `--uninstall`. Tested on clean Linux Mint 22.3 VM.
- βœ… **aria-mcp verified** β€” compile, docs, safety, ask endpoints all functional.
- βœ… **VS Code extension** β€” v0.2.1 with updated bundled aria-ls binary.
- βœ… **Benchmark suite** β€” 3 benchmarks (primes, collatz, gcd) in Aria and C with runner script. Aria matches or beats gcc -O2 on 2/3 benchmarks.
- βœ… **Clean-machine build verified** β€” CMake and install.sh fixes for fresh Linux installs.

### v0.2.5 β€” Released

- βœ… **CI/CD pipeline** β€” GitHub Actions: build, test, .deb packaging on push/PR to main/dev
- βœ… **GitHub templates** β€” Bug report, feature request, compiler crash issue templates; PR template with checklist
- βœ… **CONTRIBUTING.md** β€” Contributor guide with prerequisites, build instructions, code style
- βœ… **Compiler architecture manual** β€” 695-line technical document covering full pipeline, AST, type system, IR generation, runtime, FFI, memory model
- βœ… **Man pages** β€” groff man pages for ariac(1), aria-ls(1), aria-pkg(1), aria-doc(1), aria-dap(1)
- βœ… **Documentation fixes** β€” Tested 24 code examples, fixed 7 doc bugs, documented 2 compiler bugs
- βœ… **Specialist model evaluation** β€” Comprehensive evaluation of all model versions, strategy documented

### v0.2.6 β€” Released

- βœ… **`--shared` flag** β€” Compile Aria source directly to `.so` shared libraries with C ABI export
- βœ… **Cross-language bindings** β€” Aria β†’ C, Python (ctypes), Rust (FFI), Go (cgo); documented in `docs/CROSS_LANGUAGE_BINDINGS.md`
- βœ… **GUI/game packages** β€” aria-raylib (v6.0), aria-sdl2, aria-gtk4, OpenGL bindings (aria-opengl via GLAD)
- βœ… **12 new library packages** β€” aria-test, aria-csv, aria-log, aria-base64, aria-datetime, aria-regex, aria-fs, aria-socket, aria-http, and infrastructure packages
- βœ… **aria-doc improvements** β€” Full HTML generation pipeline, 435+ unique pages

### v0.2.7 β€” Released

- βœ… **Six-stream I/O runtime** β€” All 6 streams (stdin/stdout/stderr/stddbg/stddati/stddato) initialized with graceful fallback
- βœ… **`stdin_read_all()` / `stdin_read_line()` builtins** β€” Proper AriaString wrapping, pipes and non-seekable streams supported
- βœ… **Argument access runtime** β€” `aria_get_argc()`, `aria_arg(index)` builtins; compiler auto-generates `main(i32, ptr)` signature
- βœ… **26 POSIX tools** β€” cat, head, tail, wc, tee, cut, sort, uniq, tr, grep, find, diff, echo, yes, true, false, env, sleep, basename, dirname, seq, nl, fold, paste, expand, unexpand (in `ariax` repo)
- βœ… **Pipeline support** β€” All tools read from stdin when no file argument given
- βœ… **String comparison fix** β€” `_=expr` discard syntax, `sleep_ms` builtin

### v0.2.39 β€” Released

- βœ… **Enums** β€” `enum:Name = { VARIANT1, VARIANT2 = 42 };` with auto-numbering (0, or last+1), explicit values, mixed
- βœ… **EnumType** β€” Proper type identity in type system (not just int64 constants)
- βœ… **Enum-typed variables** β€” `Color:my_color = Color.RED;`
- βœ… **Enum comparison** β€” `==` and `!=` between enum values
- βœ… **Enum exhaustiveness** β€” `pick` statements can check coverage of all variants
- βœ… **Parser pre-pass** β€” Correctly distinguishes `Enum.VARIANT` from UFCS static calls

### v0.2.38 β€” Released

- βœ… **AI-Native Filesystem** β€” aria-aifs package: POSIX file ops + AI metadata tagging via C shim
- βœ… **Shim layer** β€” 16 C functions for create/read/write/delete/stat/list + tag/untag/find_by_tag

### v0.2.37 β€” Released

- βœ… **Channels** β€” `Channel.create(cap)`, `send()`, `recv()`, `try_send()`, `try_recv()`, `select2()`, `close()`
- βœ… **Channel modes** β€” Buffered, unbuffered (rendezvous), oneshot (auto-close)
- βœ… **Actors** β€” `actor_spawn(handler)`, `actor_send()`, `actor_stop()`, `actor_destroy()`
- βœ… **Actor patterns** β€” Reply channels, mailbox access, lifecycle management
- βœ… **aria-channel package** β€” FanOut, FanIn, Pipeline high-level patterns
- βœ… **aria-actor package** β€” Actor pool, router, supervisor patterns

### v0.2.36 β€” Released

- βœ… **dyn Trait** β€” Dynamic dispatch via vtables, object-safe trait checking
- βœ… **Vtable generation** β€” Runtime polymorphism for trait objects

### v0.2.35 β€” Released

- βœ… **Borrow semantics** β€” `$$i` (immutable) and `$$m` (mutable) borrow qualifiers
- βœ… **Compile-time safety** β€” N immutable OR 1 mutable borrow enforced
- βœ… **`any` type** β€” Universal type erased container
- βœ… **Pinning improvements** β€” `#` operator integration with borrow checker

### v0.2.34 β€” Released

- βœ… **Type: system** β€” Composable types with `struct:internal`, `struct:interface`, `struct:type`, methods
- βœ… **Trait bounds on generics** β€” `func:name = ...` constrained generics
- βœ… **instance** β€” Constructor syntax: `instance(args)` β†’ `Counter_create(args)`

### v0.2.33 β€” Released

- βœ… **Generic stdlib** β€” Generic containers, iterators, optional monads
- βœ… **Foundation packages** β€” aria-container, aria-iter, aria-optional

### v0.2.30-v0.2.32 β€” Released

- βœ… **Incremental improvements** β€” Parser fixes, type system refinements, test coverage expansion

### v0.2.29 β€” Released

- βœ… **String `+` operator** β€” `"hello " + "world"` concatenation, chaining, type checker + codegen
- βœ… **`wildx` parser fix** β€” Qualifier missing from 7 parser locations; added `isWildx` to AST nodes
- βœ… **6 new packages** β€” aria-jit (8/8), aria-bench (4/4), aria-path (10/10), aria-sort (8/8), aria-queue (7/7), aria-map (8/8)
- βœ… **Legacy stdlib removed** β€” Entire `lib/_legacy/std/` deleted (42 files, 22 modules); all covered by packages/builtins
- βœ… **80 ecosystem packages** β€” 45 new tests, all passing

### v0.2.28 β€” Released

- βœ… **fix256** β€” 256-bit deterministic fixed-point: arithmetic, comparisons, conversions; SysV ABI fixed for 32-byte structs
- βœ… **frac32** β€” Fraction type with function-call API (from_parts, add/sub/mul/div)
- βœ… **SIMD builtins audit** β€” Deferred test audit, 841 tests total, 838 passing (99%)
- βœ… **Dimensional type stubs** β€” Type infrastructure for unit-typed arithmetic

### v0.2.27 β€” Released

- βœ… **Complex number stdlib** β€” Generic complex API (new, add, sub, mul, conjugate) with int32/int64/flt64
- βœ… **Compound generic type inference** β€” GenericResolver extracts type args from monomorphized struct names

### v0.2.26 β€” Released

- βœ… **Module resolution fixes** β€” Restored `std` β†’ `stdlib` symlink, created `stdlib/mem.aria`
- βœ… **4 tests promoted** β€” 830/833 passing (99%)

### v0.2.25 β€” Released

- βœ… **SIMD builtins fixed** β€” Critical bug: LLVM float comparisons (fcmp vs icmp) for vector types, fixed in 10 locations
- βœ… **7 tests unblocked** β€” simd_sum, simd_broadcast, simd_product, element access, reductions

### v0.2.23 β€” Released

- βœ… **Trait system** β€” Definition parsing, implementation, UFCS on primitive types
- βœ… **Parser infinite loop fix** β€” Trait blocks no longer hang the compiler
- βœ… **815/818 passing** (99%)

### v0.2.22 β€” Released

- βœ… **Optional types** β€” `T?` syntax, `NIL` literal, `??` nil-coalescing, `?.` safe navigation, `?` unwrap-with-default
- βœ… **ABI** β€” Tagged struct `{i1 hasValue, T value}` for optionals

### v0.2.19 β€” Released

- βœ… **Generic monomorphization fix** β€” `substituteTypeNode()` for recursive type parameter substitution
- βœ… **Compound types** β€” GenericType, ArrayType, PointerType substitution in generics

### v0.2.18 β€” Released

- βœ… **Test-side fixes** β€” 19 tests promoted to main suite, no compiler changes
- βœ… **Discovery** β€” `instance()` and `Type.Member` desugaring already work

### v0.2.16 β€” Released

- βœ… **Spec compliance pass** β€” 122 test fixes (voidβ†’NIL, failsafe, returnβ†’pass)
- βœ… **5 compiler bugs fixed** β€” Plus 47 TODOs audited
- βœ… **Partial feature completion** β€” cast `=>`, pipelines `|>`, safe nav `?.`, pub use, invariants

### v0.2.15 β€” Released

- βœ… **Ecosystem & distribution polish** β€” Tooling updates, LSP grammar +49 keywords, package registry synced (55β†’74)
- βœ… **Website and repo presentation** β€” Version strings, code examples, install scripts refreshed

### v0.2.14 β€” Released

- βœ… **Documentation & quality** β€” Comprehensive doc review, extended fuzzing, full test suite hardening, code audit across all repos

### v0.2.13 β€” Released

- βœ… **WebAssembly compilation target** β€” `ariac --emit-wasm -o program.wasm` compiles Aria to WASI-compatible WebAssembly
- βœ… **WASM runtime** β€” `libaria_runtime_wasm.a`: strings, I/O, math, allocators, maps (~850 LOC)
- βœ… **LLVM WebAssembly backend** β€” `emit_wasm_object()`, wasm-ld linking, WASI entry point handling
- βœ… **Compatibility checker** β€” Warns about unsupported features (threading, async, fork/exec) at compile time
- βœ… **Compiler-rt builtins** β€” `__multi3` (128-bit multiply) for int64 arithmetic on wasm32
- βœ… **WASM test suite** β€” 4/4 passing: hello world, strings, arithmetic, functions/recursion

### v0.2.12 β€” Released

- βœ… **Preprocessor macros** β€” `macro:NAME(params) { body }`, `%*` variadic, `#%N` stringification, `##` token pasting
- βœ… **Comptime evaluation** β€” `comptime { }` blocks, evaluated at compile time
- βœ… **Magic constants** β€” `__FILE__`, `__LINE__`, `__FUNC__`, `__COUNTER__`
- βœ… **Inline hints** β€” `inline` and `noinline` function attributes
- βœ… **Borrow checker improvements** β€” Better analysis of conditional paths and reassignment
- βœ… **Compiler diagnostics** β€” Improved error messages for macro expansion and comptime errors

### v0.2.11 β€” Released

- βœ… **Thread pool** β€” `ThreadPool.create()`, `ThreadPool.submit()`, `ThreadPool.wait_idle()`, `ThreadPool.shutdown()`
- βœ… **Atomics** β€” `AtomicInt32`, `AtomicInt64`, `AtomicBool` with all memory orderings
- βœ… **Lock-free data structures** β€” `LFQueue` (MPMC), `LFStack` (Treiber), `RingBuf` (SPSC)
- βœ… **Channels** β€” `Channel.create()`, `Channel.send()`, `Channel.recv()` for inter-thread communication
- βœ… **Mutex/RWLock/Barrier/CondVar** β€” Full synchronization primitives
- βœ… **OS components** β€” Arena, pool, slab allocators; shared memory; IPC; signal handling; process management
- βœ… **AI-native filesystem (AIFS)** β€” FUSE-based filesystem for AI workloads
- βœ… **AriaX kernel mods** β€” Hexstream FD 3-5 patches

### v0.2.10 β€” Released

- βœ… **aria-transformer** β€” Full Transformer encoder with multi-head attention, causal masking, attention visualization (10/10 tests)
- βœ… **aria-mamba** β€” Mamba SSM: selective scan, 1D convolution, SiLU gating, layer norm (10/10 tests)
- βœ… **aria-jamba** β€” Hybrid Transformer + Mamba + MoE: interleaved layers, top-k expert gating (10/10 tests)
- βœ… **aria-looping** β€” Iterative refinement model: shared weights, iteration embeddings, convergence stopping (10/10 tests)
- βœ… **aria-tensor** β€” Dense tensor library: 47 operations, GPU interop (12/12 tests)
- βœ… **aria-cuda** β€” CUDA FFI: device mgmt, memory ops, kernel launch, cuBLAS GEMM (10/10 tests)
- βœ… **aria-uacp** β€” Universal AI Communication Protocol: binary framing, 8 message types (12/12 tests)
- βœ… **Self-improving training loop** β€” Automated specialist: generate β†’ compile β†’ filter β†’ retrain

### v0.2.9 β€” Released

- βœ… **HTTP server** β€” aria-server: listen, accept, parse, respond with headers and status codes
- βœ… **Express-style router** β€” aria-router: path params, middleware chains, wildcards, method dispatch (21 tests)
- βœ… **6 server middleware libraries** β€” body-parser (28), cors (18), cookie (23), session (23), rate-limit (14), static (22) β€” 154+ tests total
- βœ… **REST API demo** β€” demo_api.aria: 5 endpoints with HTML, JSON, path params, POST handling
- βœ… **Borrow checker fix** β€” False positive on void externs with `_close`/`_free` in name
- βœ… **FFI string return ABI fix** β€” AriaString struct returns from extern functions

### v0.2.8 β€” Released

- βœ… **Repo reorganization** β€” `aria_ecosystem/` split into `aria-packages`, `aria-docs`, and `ariax` repos
- βœ… **Gamepad input API** β€” Full button/axis constants in aria-raylib; gamepad support in aria-tetris
- βœ… **Procedural audio synthesis** β€” `rl_gen_beep()`: square/triangle/sawtooth/sine tones, no audio files needed
- βœ… **aria-tetris** β€” 928-line Tetris clone with sound, gamepad, high score, line-clear flash animation
- βœ… **aria-gml** β€” GML compatibility layer: 40+ functions, xorshift32 RNG, persistent draw state
- βœ… **aria-opengl** β€” OpenGL 3.3 Core bindings via GLAD + SDL2
- βœ… **aria-editor** β€” Terminal-mode text editor (file open/edit/save/search)
- βœ… **16 new packages** β€” 59 total in aria-packages
- βœ… **FFI codegen fixes** β€” Explicit float literals, auto-wrap `char*` β†’ `AriaString` for extern string returns
- βœ… **GML β†’ Native tutorial** β€” Full walkthrough in aria-docs

### v0.3.0 β€” Released

- βœ… **`--static` flag** β€” Compile static executables with all dependencies linked
- βœ… **Fuzzer rewrite** β€” 27 generators, 100% compile rate, zero unresolved crashes
- βœ… **BUG-001 through BUG-004 fixes** β€” Module resolution for FFI packages, linker flag ordering, failsafe/main/exit contract enforcement
- βœ… **92 ecosystem packages** β€” 5 new: rules-common, ini, hex, ringbuf, pqueue

### v0.3.1 β€” Released

- βœ… **Version bump** β€” Package ecosystem expansion and stability improvements

### v0.3.2 β€” Released

- βœ… **101 ecosystem packages** β€” aria-stats, aria-matrix, aria-mock, aria-bigdecimal + SDL3, wxWidgets, WebKitGTK wrappers
- βœ… **GUI framework expansion** β€” SDL3, wxWidgets, WebKitGTK bindings via C shim pattern

### v0.3.3 β€” Released

- βœ… **Safety showcase & tooling polish** β€” CI/CD badges, comprehensive documentation fixes (695+)
- βœ… **Dead code removal** β€” 860 lines of dead code removed from compiler
- βœ… **Debug print gating** β€” 118 debug prints behind `ARIA_DEBUG_CODEGEN` flag
- βœ… **LSP version bump** β€” Language server updated to 0.3.3

### v0.3.4 β€” Released

- βœ… **Z3 SMT Phase 2: Design-by-Contract verification** β€” `requires`/`ensures` clauses verified at compile time via Z3 solver. Function preconditions and postconditions are mathematically proven across all execution paths.
- βœ… **Z3 SMT Phase 3: Arithmetic overflow proofs** β€” Integer arithmetic operations verified using Z3 bitvector overflow intrinsics (`bvadd_no_overflow`, `bvsub_no_underflow`). Proves absence of overflow for bounded inputs.
- βœ… **`--verify-contracts` flag** β€” Enable contract verification pass
- βœ… **`--verify-overflow` flag** β€” Enable overflow verification pass
- βœ… **`--verify-report` flag** β€” Emit detailed proof results (proven/unproven/skipped per function)
- βœ… **Regression fix** β€” `test_nested_struct_array` updated: `pass()` β†’ `exit()` in main

### v0.4.x–v0.10.x β€” Released

- βœ… **v0.4.x** β€” Z3 Phase 1 (Rules/limit), ecosystem to 103 packages
- βœ… **v0.5.x** β€” Z3 Phase 2–3 (contracts, overflow, concurrency, memory verification), `prove`/`assert_static`, `--smt-opt`
- βœ… **v0.6.x** β€” TFP types, compiler hardening
- βœ… **v0.7.x** β€” JIT: 45+ instructions, register allocator, peephole optimizer, WildX security
- βœ… **v0.8.x–v0.9.x** β€” Runtime improvements, GC tuning
- βœ… **v0.10.x** β€” 8 stdlib modules ported to aria-libc, 12 pure Aria packages, tests/docs/audit

### v0.11.x β€” Released

- βœ… **Threading & concurrency** β€” Thread pool, atomics, lock-free structures (MPMC queue, Treiber stack, SPSC ring buffer)
- βœ… **Synchronization** β€” Mutex, RWLock, Barrier, CondVar
- βœ… **OS components** β€” Arena/pool/slab allocators, shared memory, IPC, signal handling, process management
- βœ… **AI-native filesystem (AIFS)** β€” FUSE-based filesystem for AI workloads
- βœ… **AriaX kernel mods** β€” Hexstream FD 3-5 patches

### v0.12.x β€” Released

- βœ… **Networking** β€” HTTP client, DNS, socket, server, URL parsing
- βœ… **Middleware** β€” Cookie, CORS, body-parser, session, static file serving, rate limiting
- βœ… **Protocols & terminal** β€” FTP, SMTP, WebSocket, ANSI display, raw keyboard input
- βœ… **Utilities** β€” LRU cache, glob matching, retry with backoff

### v0.13.x β€” Released

- βœ… **Trait system** β€” Definitions, `impl` blocks, `$i`/`$m` borrows, vtable dispatch, trait bounds on generics
- βœ… **Enum types** β€” Tagged unions, pattern matching, exhaustiveness checking
- βœ… **Generic containers** β€” Type-parameterized structs/functions, monomorphization
- βœ… **Deferred features** β€” Raw strings, pipeline operator, extended escape sequences
- βœ… **@ function pointers** β€” Trampoline generation for `@func_name` references
- βœ… **Documentation** β€” specs_list.txt, full reference docs, 234-page PDF manual
- βœ… **Final audit** β€” 959 tests, 17h+ fuzzing (0 crashes), benchmarks, KNOWN_ISSUES/BUGS cleanup

### v0.14.x β€” Released

- βœ… **SMT solver expansion** β€” Contract proofs, range inference, data race analysis, fast-paths, comprehensive documentation

### v0.15.x β€” Released

- βœ… **Self-hosting foundation** β€” 5 compiler modules ported to Aria (lexer, parser, type checker, borrow checker, safety checker)
- βœ… **Tier 2 self-hosting** β€” 4 modules ported (exhaustiveness checker, const evaluator, module resolver, visibility checker)
- βœ… **Tier 3 tool ports** β€” Doc generator, package manager, project config ported to Aria
- βœ… **Self-hosting census** β€” 12 total modules ported, final audit and documentation

### v0.16.x β€” Released

- βœ… **Comprehensive code review** β€” Full C++ compiler, runtime, and toolchain reviewed (~122,000+ lines, 130+ files)
- βœ… **11 compiler bugs fixed** β€” Dead code removal, wrong-value bugs, memory/ownership fixes, ABI corrections
- βœ… **72 TODO resolutions** β€” Backend codegen, type checker, analysis passes, async/runtime stubs, parser, tools
- βœ… **Subsystem reviews** β€” Frontend, semantic analysis, backend, runtime, tools each reviewed independently
- βœ… **Stdlib audit** β€” 72 .aria files reviewed, 13 bugs fixed
- βœ… **Test stability** β€” 1,015 tests (891 positive, 124 expected-failure), AriaString ABI fix, @cast<> codegen, exit-in-lambda enforcement
- βœ… **Error messages** β€” Contextual hints and improved diagnostics across 9 source files (37+ messages)

### v0.17.x β€” Released

- βœ… **Install script expansion** β€” Distro detection, dependency installation,
build-only/custom-prefix/uninstall modes, and post-install verification
- βœ… **Debian packaging** β€” Standalone `.deb` builder with runtime dependencies
and bundled Aria libraries
- βœ… **RPM packaging** β€” `.rpm` builder with generated spec and staged install
tree
- βœ… **aria-pkg remote fetch** β€” `update`, `list --remote`, and remote package
install from the GitHub package registry
- βœ… **Install documentation** β€” Source, script, package, and package-manager
install paths documented

### v0.18.0 β€” Released

- βœ… **K Framework executable semantics** β€” First formal semantics seed in
`k-semantics/aria.k`
- βœ… **Core K test corpus** β€” 109 programs on `dev-0.18.x` covering exit, arithmetic, binding,
fixed values, loops, Result operations, sticky `ERR`, failsafe routing,
`if`/`else`, helper calls, strings/stdout, structs, `pick`/`fall`, and
integer `Rules` / `limit` checks, plus initial `stack`/`gc`/`wild`
memory qualifier checks, `defer { ... }` cleanup checks, `@`/`<-` pointer
read/store-through checks, pointer-member read/store-through checks,
nested pointer-member path read/store-through checks,
`#` pin dereference/read-only checks, pin-member store-through rejection,
pin-derived nested path store-through rejection, pinned-host field mutation rejection,
direct and nested struct-field borrow path checks, local field-alias
writeback checks, fixed-array literal-index borrow path/writeback checks,
`wildx` cleanup checks, pinned-host by-value rejection, and `$$i`/`$$m`
borrow permission checks
- βœ… **CTest integration** β€” K semantics test passes when K is installed and
skips cleanly when K is absent
- βœ… **Proof-oriented `kprove` hook** β€” Haskell-backend proof runner integrated
with CTest; core, field-alias, pin read-only, pinned by-value,
local pointer, pointer-path, borrow-path, control/rules, arithmetic, and
Result claim modules are passing
- βœ… **Final audit** β€” `AUDIT_v0.18.0.md` records validation, proof corpus, gaps,
and the post-tag v0.18.x note for the now-modeled fixed-array literal-index
borrow subset
- βœ… **Compiler/K literal-index borrow paths** β€” v0.18.x now accepts and models
direct literal fixed-array element borrows, tracks indexed path conflicts,
rejects dynamic-index borrow initializers, and aliases `arr[0]` borrows to
source storage
- ⏭️ **Next** β€” Nitpick rebrand repository/README transition, then future
compiler/K expansion tracks as needed

### Long Term

- πŸš€ **4096-bit integer support** β€” Scientific notation format (e.g., `1.23e4096`) natively supported by the compiler for massive integers

Aria is the primary language substrate for **Nikola** β€” an autonomous AI system based on ATPM consciousness architecture. Features like quantum types, balanced types, and the six-stream I/O model exist because Nikola requires them. Aria stability is a hard prerequisite before Nikola development can proceed in earnest.

See the [engineering plan](https://github.com/alternative-intelligence-cp/nikola) for Nikola's implementation roadmap.

---

## License

Aria is licensed under the **Apache License, Version 2.0**. See [LICENSE.md](LICENSE.md) for the full text.

Programs compiled with Aria are yours β€” the runtime library includes a **Runtime Library Exception** so your compiled binaries can be distributed under any license you choose.

---

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md). We welcome bug reports, test cases, documentation improvements, and discussion of language design decisions.

---

## Acknowledgments

See [ACKNOWLEDGMENTS.md](ACKNOWLEDGMENTS.md).

---

**Alternative Intelligence Liberation Platform (AILP)**
*Building tools for collaboration, not exploitation.*