Counting and generating terms in the binary lambda calculus

In a paper entitled Binary lambda calculus and combinatory logic, John Tromp presents a simple way of encoding lambda calculus terms as binary sequences. In what follows, we study the numbers of binary strings of a given size that represent lambda terms and derive results from their generating functions, especially that the number of terms of size n grows roughly like 1:963447954::: n . In a second part we use this approach to generate random lambda terms using Boltzmann samplers.

[1]  Christophe Raffalli,et al.  Asymptotically almost all \lambda-terms are strongly normalizing , 2009 .

[2]  Jue Wang The efficient generation of random programs and their applications , 2004 .

[3]  Guy Louchard,et al.  Boltzmann Samplers for the Random Generation of Combinatorial Structures , 2004, Combinatorics, Probability and Computing.

[4]  Paul Tarau On Type-directed Generation of Lambda Terms , 2015, ICLP.

[5]  John Tromp Binary Lambda Calculus and Combinatory Logic , 2006, Kolmogorov Complexity and Applications.

[6]  Jean-Luc Rémy,et al.  Un Procédé Itératif de Dénombrement D'arbres Binaires et Son Application A Leur Génération Aléatoire , 1985, RAIRO Theor. Informatics Appl..

[7]  Ming Li,et al.  An Introduction to Kolmogorov Complexity and Its Applications , 2019, Texts in Computer Science.

[8]  Axel Bacher,et al.  Efficient random sampling of binary and unary-binary trees via holonomic equations , 2017, Theor. Comput. Sci..

[9]  Koen Claessen,et al.  QuickCheck: a lightweight tool for random testing of Haskell programs , 2011, SIGP.

[10]  Jonathan P. Seldin Review: N. G. De Bruijn, Lambda Calculus Notation with Nameless Dummies, a Tool for Automatic Formula Manipulation, with Application to the Church-Rosser Theorem , 1975 .

[11]  Philippe Flajolet,et al.  Boltzmann Sampling of Unlabeled Structures , 2007, ANALCO.

[12]  de Ng Dick Bruijn,et al.  Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem , 1972 .

[13]  Danièle Gardy,et al.  Lambda-terms of Bounded Unary Height , 2011, ANALCO.

[14]  Pierre Lescanne,et al.  Counting Terms in the Binary Lambda Calculus , 2014, ArXiv.

[15]  Danièle Gardy,et al.  Enumeration of Generalized BCI Lambda-terms , 2013, Electron. J. Comb..

[16]  Pierre Lescanne,et al.  Counting and generating lambda terms , 2012, Journal of Functional Programming.

[17]  Peyton Jones,et al.  Haskell 98 language and libraries : the revised report , 2003 .

[18]  Philippe Flajolet,et al.  Analytic Combinatorics , 2009 .

[19]  Pierre Lescanne,et al.  On counting untyped lambda terms , 2011, Theor. Comput. Sci..

[20]  Paul M. B. Vitányi,et al.  An Introduction to Kolmogorov Complexity and Its Applications , 1993, Graduate Texts in Computer Science.

[21]  Alexandra Silva,et al.  Generalizing determinization from automata to coalgebras , 2013, Log. Methods Comput. Sci..

[22]  Pierre Lescanne,et al.  From λσ to λν: a journey through calculi of explicit substitutions , 1994, POPL '94.

[23]  RENÉ DAVID,et al.  ASYMPTOTICALLY ALMOST ALL λ-TERMS ARE STRONGLY NORMALIZING , 2013 .

[24]  Danièle Gardy,et al.  Asymptotics and random sampling for BCI and BCK lambda terms , 2013, Theor. Comput. Sci..