R.I.P.
👻
Ghosted
Cyclic Graphs and Memoization in Pure $λ$-Calculus
June 22, 2026 · Grace Period · + Add venue
Authors
Bo Yang
arXiv ID
2606.22908
Category
cs.PL: Programming Languages
Cross-listed
cs.LO
Citations
0
Abstract
$λ$-calculus normally requires an added recursion construct, a \texttt{letrec}, a $μ$-binder, or a built-in $Y$ for graph reduction, and sharing the repeated work of a memoized or dynamic-programming function normally requires an impure cache. We show that no extension is needed. We apply tabling, the standard method for solving a least-fixpoint equation, to weak-head reduction; this defines a new operational semantics for the pure $λ$-calculus that keeps each term's standard lazy meaning. A term that reaches finitely many distinct states comes out as a finite graph, possibly cyclic; the calculus stays pure, and the graph is sound and independent of reduction order. We implemented this operational semantics as a $λ$-calculus interpreter. It does dynamic programming automatically, sharing repeated subproblems with no memoization table. It creates and transforms cyclic graphs with no added recursion construct. And it decides an unproductive loop, returning $\bot$ for $Ω$ in finite time. What the evaluator returns is a graph, so the $λ$-calculus becomes a DSL for graph computation: the memo table of dynamic programming, the transposition table of game search, and the visited set of graph reachability and points-to analysis are all tabling on state identity, and none of them is written by hand. Compilation is one more such problem: we write a bootstrap compiler that compiles its own source, all as a pure $λ$-term.
Community Contributions
Found the code? Know the venue? Think something is wrong? Let us know!
📜 Similar Papers
In the same crypt — Programming Languages
R.I.P.
👻
Ghosted
Tensor Comprehensions: Framework-Agnostic High-Performance Machine Learning Abstractions
R.I.P.
👻
Ghosted
Glow: Graph Lowering Compiler Techniques for Neural Networks
R.I.P.
👻
Ghosted
Learnable Programming: Blocks and Beyond
R.I.P.
👻
Ghosted
Scenic: A Language for Scenario Specification and Scene Generation
R.I.P.
👻
Ghosted