Files
rose-ash/lib
giles 80ab039ada
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
mk: phase 7 — table-1 + table-3, Ackermann canary
Two more arities of the naive memoization wrapper:

table-1: predicate (1-arg) tabling. Cache entry is :ok / :no.
  Demonstrated with a tabled membero-as-predicate.

table-3: 3-arg (i1 i2 output) tabling. Cache key joins the two
  inputs; cache value is the output value list.
  Canonical demo: tabled Ackermann.

  (ack-o 0 0 q) -> 1
  (ack-o 2 3 q) -> 9
  (ack-o 3 3 q) -> 61

A(3,3) executes A(2,..) many times, A(1,..) more, A(0,..) most. With
table-3 each (m, n) pair is computed once.

6 new tests, 644/644 cumulative.
2026-05-08 22:29:15 +00:00
..