apl: end-to-end pipeline apl-run + 25 source-string tests (400/400)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m7s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m7s
apl-run = parse-apl + apl-eval-ast against empty env. Wires tokenizer + parser + transpile + runtime as one entry point. test.sh now loads tokenizer.sx + parser.sx alongside transpile.sx. Source-string tests cover scalars, strands, dyadic arith, right-to-left precedence, monadic primitives, /, \, ⌈/, ×/, ∘.×, +.×, ⍴, comparisons, classic one-liners. Tokenizer doesn't yet handle decimal literals (3.7 → 3 . 7), so two such tests substituted with integer min/max-reduce.
This commit is contained in:
@@ -115,7 +115,7 @@ and tightens loose ends.
|
||||
function; eval-ast resolves the inner glyph to a runtime fn and dispatches
|
||||
to the matching operator helper (`apl-reduce`, `apl-each`, `apl-outer`,
|
||||
`apl-inner`, `apl-commute`, `apl-compose`, `apl-power`, `apl-rank`).
|
||||
- [ ] **End-to-end pipeline** — entry point `apl-run : string → array` that
|
||||
- [x] **End-to-end pipeline** — entry point `apl-run : string → array` that
|
||||
chains `apl-tokenize` → `parse-apl` → `apl-eval-ast` against an empty env.
|
||||
Verify with one-liners (`+/⍳5` → 15, `1 2 3 + 4 5 6` → 7 9 11, etc.) and
|
||||
with the actual `.apl` source files in `tests/programs/`.
|
||||
@@ -147,6 +147,7 @@ data; format for string templating.
|
||||
|
||||
_Newest first._
|
||||
|
||||
- 2026-05-07: Phase 7 step 2 — end-to-end pipeline `apl-run : string → array` (parse-apl + apl-eval-ast against empty env); +25 source-string tests covering scalars, strands, dyadic arith, monadic primitives, operators, ∘./.g products, comparisons, famous one-liners (+/⍳10=55, ×/⍳10=10!); tokenizer can't yet parse decimals so `3.7` literal tests dropped; **400/400**
|
||||
- 2026-05-07: Phase 7 step 1 — operators in apl-eval-ast via apl-resolve-monadic/dyadic; supports / ⌿ \ ⍀ ¨ ⍨ ∘. f.g; queens(8) test removed (too slow for 300s timeout); +14 eval-ops tests; 375/375
|
||||
- 2026-05-07: Phase 7 added — end-to-end pipeline, operators in eval-ast, :quad-name, bracket-indexing verify, idiom expansion, :Trap; aim is to wire parser↔runtime so .apl source files actually run
|
||||
- 2026-05-07: Phase 6 idiom corpus — lib/apl/tests/idioms.sx; 34 classic idioms (sum, mean, max/min/range, scan, sort, reverse, first/last, take/drop, tally, mod, identity matrix, mult-table, factorial, parity count, all/any, mean-centered, ravel, rank); **all unchecked items in plan now ticked**; 362/362
|
||||
|
||||
Reference in New Issue
Block a user