Compiling Untyped Lambda Calculus to Lower-Level Code by Game Semantics and Partial Evaluation
Daniil Berezun
Neil D. Jones
Any expression M in ULC (the untyped λ-calculus) can be compiled into a rather low-level language we call LLL, whose programs contain none of the traditional implementation devices for functional languages: environments, thunks, closures, etc. A compiled program is first-order functional and has a fixed set of working variables, whose number is independent of M. The generated LLL code in effect traverses the subexpressions of M.
We apply the techniques of game semantics to the untyped λcalculus, but take a more operational viewpoint that uses less mathematical machinery than traditional presentations of game semantics. Further, the untyped lambda calculus ULC is compiled into LLL by partially evaluating a traversal algorithm for ULC.
https://dl.acm.org/doi/10.1145/3018882.3020004
Daniil Berezun
Neil D. Jones
Any expression M in ULC (the untyped λ-calculus) can be compiled into a rather low-level language we call LLL, whose programs contain none of the traditional implementation devices for functional languages: environments, thunks, closures, etc. A compiled program is first-order functional and has a fixed set of working variables, whose number is independent of M. The generated LLL code in effect traverses the subexpressions of M.
We apply the techniques of game semantics to the untyped λcalculus, but take a more operational viewpoint that uses less mathematical machinery than traditional presentations of game semantics. Further, the untyped lambda calculus ULC is compiled into LLL by partially evaluating a traversal algorithm for ULC.
https://dl.acm.org/doi/10.1145/3018882.3020004
ACM Conferences
Compiling untyped lambda calculus to lower-level code by game semantics and partial evaluation (invited paper) | Proceedings of…