lumbda/proof
russell@unturf.com 3463fadd3f C --fast named-let bug: minimal repro + workaround, all 4 tiers pass now
Hunted the C --fast compiler bug that was hanging on the EML proof.
Narrowed to a specific pattern:

  (let loop ((t start))
    (let ((next (fn t)))
      (if next (loop next) t)))

A named-let whose body is (let ((x (...))) (if x (recurse x) base)).
The recursive call inside the inner let+if branch never reaches the
loop closure — hangs or segfaults.

Reproducible with a 4-line test case; filed as
c/TODO-named-let-bytecode.md with minimal repro, suspected cause
(env-chain mismatch between PUSH_ENV and TAIL_CALL), and a known-
good workaround.

Workaround landed in proof/eml_proof_in_lumbda.lsp's `normalize`:
replaced the named-let with an internal recursive `define`, which
compiles correctly under --fast. Same logic, different surface
syntax. All four Lumbda tiers now verify the proof.

Benchmark refreshed (make bench-proof):

                              cold     cached
  Lumbda asm                   46 ms    7 ms
  Lumbda C --fast              65 ms    9 ms
  Lumbda C (tree-walker)       87 ms   12 ms
  Lumbda Python --fast        651 ms  232 ms
  Lean 4                      722 ms    5 ms

All four tiers now green. Asm still fastest (46 ms cold vs Lean's
722 ms — ~16× faster). Cached Lumbda asm 7 ms vs Lean 5 ms (within
1.5×). The C --fast tier went from "hangs" to 65 ms cold — competitive
with asm once the compiler bug is dodged.

Whitepaper §8.6 table updated; prior "(hangs)" row is gone;
footnote on the named-let workaround links the TODO file.
2026-04-17 20:56:00 -04:00
..
.github/workflows Add superinstructions LOOK+1, LOOK-1 for 25% faster loops 2026-04-14 13:53:08 -04:00
lean Add superinstructions LOOK+1, LOOK-1 for 25% faster loops 2026-04-14 13:53:08 -04:00
.gitignore Add superinstructions LOOK+1, LOOK-1 for 25% faster loops 2026-04-14 13:53:08 -04:00
benchmark.sh Add EML universality proof — verify arXiv:2603.21852v2 2026-04-13 19:43:18 -04:00
benchmark_results.md Add proof friction benchmark, update README 2026-04-14 13:31:05 -04:00
eml_proof.lsp Add EML universality proof — verify arXiv:2603.21852v2 2026-04-13 19:43:18 -04:00
eml_proof.py Add EML universality proof — verify arXiv:2603.21852v2 2026-04-13 19:43:18 -04:00
eml_proof_in_lumbda.lsp C --fast named-let bug: minimal repro + workaround, all 4 tiers pass now 2026-04-17 20:56:00 -04:00