ocaml: phase 5.1 lambda_calc.ml baseline (17/17 pass)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 22s

Untyped lambda calculus interpreter inside OCaml-on-SX:
  type term = Var | Abs of string * term | App | Num of int
  type value = VNum of int | VClos of string * term * env
  let rec eval env t = match t with ...

(\x.\y.x) 7 99 = 7. The substrate handles two ADTs, recursive eval,
closure-based env, and pattern matching all written as a single
self-contained OCaml program — strong validation.
This commit is contained in:
2026-05-08 19:49:08 +00:00
parent ce81ce2e95
commit de8b1dd681
3 changed files with 48 additions and 0 deletions

View File

@@ -407,6 +407,12 @@ _Newest first._
binary search tree (`type 'a tree = Leaf | Node of 'a * 'a tree *
'a tree`) with insert + in-order traversal. Tests parametric ADT,
recursive match, List.append, List.fold_left.
- 2026-05-08 Phase 5.1 — lambda_calc.ml baseline (17/17 pass). Untyped
lambda calculus interpreter using two ADTs (`type term = Var | Abs |
App | Num`, `type value = VNum | VClos`), an env as `(string * value)
list`, and recursive eval. `(\x.\y.x) 7 99 = 7` end-to-end. Demonstrates
the substrate handles a non-trivial AST + closure-based evaluator
written in OCaml-on-SX.
- 2026-05-08 Phase 6 — Char predicates: is_digit/is_alpha/is_alnum/
is_whitespace/is_upper/is_lower (+7 tests, 461 total). All written
in OCaml in runtime.sx using Char.code + ASCII range checks.