A Logic Programming Playground for Lambda Terms, Combinators, Types and Tree-based Arithmetic Computations
Paul Tarau

TL;DR
This paper presents a Prolog-based declarative playground for generating, manipulating, and analyzing lambda terms, combinators, and types, with novel compressed representations and algorithms for ranking, unranking, and evaluation.
Contribution
It introduces a unified Prolog framework with new compressed de Bruijn representations and algorithms for lambda calculus structures and their properties.
Findings
Efficient algorithms for lambda term generation and type inference.
New compressed de Bruijn representation facilitating ranking and unranking.
Insights into the structure and distribution of SK-combinator trees.
Abstract
With sound unification, Definite Clause Grammars and compact expression of combinatorial generation algorithms, logic programming is shown to conveniently host a declarative playground where interesting properties and behaviors emerge from the interaction of heterogenous but deeply connected computational objects. Compact combinatorial generation algorithms are given for several families of lambda terms, including open, closed, simply typed and linear terms as well as type inference and normal order reduction algorithms. We describe a Prolog-based combined lambda term generator and type-inferrer for closed well-typed terms of a given size, in de Bruijn notation. We introduce a compressed de Bruijn representation of lambda terms and define its bijections to standard representations. Our compressed terms facilitate derivation of size-proportionate ranking and unranking algorithms of…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Logic, Reasoning, and Knowledge · Advanced Algebra and Logic
