72e54f4fd3
The surface-form file extension changes from .ailx to .ail. AILang's
authoring surface now uses the same .ail stem as its canonical JSON
form (.ail.json), giving the language a single coherent extension
family: .ail is the LLM-authored Form A, .ail.json is the canonical
JSON-AST Form B.
Scope (touched):
- 61 example renames examples/**/*.ailx → .ail (git mv)
- 1 rename experiments/.../rendered/ailx.md → ail.md
- 35 content-edited live-toolchain files (crates/, docs/DESIGN.md,
docs/roadmap.md, docs/PROSE_ROUNDTRIP.md, skills/, bench/reference/*.c,
experiment crates under experiments/.../{render,harness,master})
- Experiment-crate cohort rename Cohort::Ailx → Cohort::Ail,
Form::Ailx → Form::Ail, per_cohort/ailx → per_cohort/ail,
{form-only: ailx} → {form-only: ail}, ```ailx → ```ail
Out of scope (deliberately untouched, to preserve honest history):
- docs/journal-archive.md (content-frozen per CLAUDE.md)
- docs/journals/, docs/specs/, docs/plans/, bench/orchestrator-stats/
- experiments/.../runs/ (frozen LLM-output artefacts; models actually
saw .ailx — renaming would falsify the experimental record)
Verification: cargo build/test --workspace green; experiment crate
cargo test green; bench/check.py + compile_check.py + cross_lang.py
all 0-regressed; negative grep for ailx|Ailx|AILX outside the
out-of-scope paths returns zero matches.
Opens immediate follow-up: roadmap.md P2 todo `ail check`/build/run
accept .ail extension — after this rename, .ail is canonical
authoring surface but the CLI still produces a misleading JSON-parse
error on `ail check foo.ail`. That's the next iter.
54 lines
1.4 KiB
Plaintext
54 lines
1.4 KiB
Plaintext
; Iter 18g.2 RED-test fixture: a let-binder whose value is the
|
|
; result of an Own-returning fn call. 18c.3's
|
|
; `is_rc_heap_allocated` predicate returns `false` for any
|
|
; `Term::App` shape (its doc-comment explicitly defers this case
|
|
; to "later iters tied to (own) ret-mode contracts"); we now have
|
|
; those contracts (Iter 18a), and the let-scope close should drop
|
|
; the binder.
|
|
;
|
|
; Surfaced by 18f.2 / 18g.1: `bench_latency_explicit`'s
|
|
; `(let t (app build_tree 19) ...)` leaks the entire depth-19
|
|
; Tree (~1M cells) because `t` is not trackable. This minimal
|
|
; repro uses a 2-cell depth-1 tree.
|
|
;
|
|
; Pre-fix: live = 3 (TNode + 2 TLeaf children — the depth-1
|
|
; tree).
|
|
; Post-fix: live = 0.
|
|
|
|
(module rc_let_owned_app_leak
|
|
|
|
(data Tree
|
|
(ctor TLeaf)
|
|
(ctor TNode (con Int) (con Tree) (con Tree)))
|
|
|
|
(fn build
|
|
(type
|
|
(fn-type
|
|
(params (con Int))
|
|
(ret (own (con Tree)))))
|
|
(params d)
|
|
(body
|
|
(if (app == d 0)
|
|
(term-ctor Tree TLeaf)
|
|
(term-ctor Tree TNode 1
|
|
(app build (app - d 1))
|
|
(app build (app - d 1))))))
|
|
|
|
(fn pin
|
|
(type
|
|
(fn-type
|
|
(params (borrow (con Tree)))
|
|
(ret (con Int))))
|
|
(params t)
|
|
(body
|
|
(match t
|
|
(case (pat-ctor TLeaf) 0)
|
|
(case (pat-ctor TNode v l r) 1))))
|
|
|
|
(fn main
|
|
(type (fn-type (params) (ret (con Unit)) (effects IO)))
|
|
(params)
|
|
(body
|
|
(let t (app build 1)
|
|
(do io/print_int (app pin t))))))
|