Problem and Motivation Statistics of lambda-terms Open problems Statistical properties of random lambda-terms in de-Bruijn notation ∗ Maciej Bendkowski 3 Olivier Bodini 1 Sergey Dovgal 1 , 2 , 4 1 Université Paris-13, 2 Université Paris-Diderot 3 Jagiellonian University 4 Moscow Institute of Physics and Technology CLA-2017, Götenburg, Sweden ∗ in progress Bendkowski, Bodini, D. Statistics of lambda-terms 1 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems Problem and Motivation 1 Statistics of lambda-terms 2 3 Open problems Bendkowski, Bodini, D. Statistics of lambda-terms 2 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems Outline Problem and Motivation 1 Statistics of lambda-terms 2 Open problems 3 Bendkowski, Bodini, D. Statistics of lambda-terms 2 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems Example of lambda-term in de-Bruijn notation λ λ λ @ @ @ 2 0 1 0 A closed lambda-term λ x .λ y .λ z . xz ( yz ) Bendkowski, Bodini, D. Statistics of lambda-terms 3 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems Grammar of plain lambda-terms λ @ L = + + N L L L L — plain lambda-term λ — abstraction @ — application N — variable; de Bruijn index ∈ { 0 , 1 , 2 , . . . } Bendkowski, Bodini, D. Statistics of lambda-terms 4 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems Redex and beta-reduction @ β ( λ n . n × 2 ) 7 → 7 × 2 λ Ω = ( λ x . xx )( λ x . xx ) L β → Ω Ω L Bendkowski, Bodini, D. Statistics of lambda-terms 5 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems Redex and beta-reduction @ λ β − → L L L ⊙ L ⊙ ⊙ Bendkowski, Bodini, D. Statistics of lambda-terms 6 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems Main question Investigate statistical properties of random plain / closed lambda-terms in de-Bruijn notation: • number of lambdas, variables, abstractions,. . . • length to the lefmost outermost redex , • unary height, longest lambda-run • . . . Statistical properties ⇒ Property-based testing Random generation Bendkowski, Bodini, D. Statistics of lambda-terms 7 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems Size notion of lambda-terms [Bodini, Gardy, Gitenberger, Jacquot ’13] Closed lambda-terms with variable size = 1. [David, Grygiel, Kozik, Raffalli, Theyssier, Zaionc ’13] Closed lambda-terms with variable size = 0. [Gitenberger, Gołe ¸biewski ’16] Natural counting of lambda-terms. | 0 | = a , | S | = b , | λ | = d , | @ | = d Bendkowski, Bodini, D. Statistics of lambda-terms 8 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems Size notion of lambda-terms [Bodini, Gardy, Gitenberger, Jacquot ’13] Closed lambda-terms with variable size = 1. [David, Grygiel, Kozik, Raffalli, Theyssier, Zaionc ’13] Closed lambda-terms with variable size = 0. [Gitenberger, Gołe ¸biewski ’16] Natural counting of lambda-terms. | 0 | = a , | S | = b , | λ | = d , | @ | = d Bendkowski, Bodini, D. Statistics of lambda-terms 8 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems Size notion of lambda-terms [Bodini, Gardy, Gitenberger, Jacquot ’13] Closed lambda-terms with variable size = 1. [David, Grygiel, Kozik, Raffalli, Theyssier, Zaionc ’13] Closed lambda-terms with variable size = 0. [Gitenberger, Gołe ¸biewski ’16] Natural counting of lambda-terms. | 0 | = a , | S | = b , | λ | = d , | @ | = d Bendkowski, Bodini, D. Statistics of lambda-terms 8 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems What is “random”? Thanks to previous talks Natural size notion of lambda-term. Stay tuned for the definition and comparison to other models. Sample lambda-terms of size n uniformly ( leitmotif of this talk, but not the only possibility) Sample lambda-terms of size n and parameter value k uniformly. Bivariate generating function + tuning of Boltzmann sampler. Choose any subset of parameters, fix their values and sample at uniform from the desired set. [Bodini, Ponty ’10]: Newton iteration or asymptotic approximations � � log 2 ( size ) · #vars 7 · ( #vars+#eqs ) [Bodini, D. ’17]: Fast exact tuning in O . Bendkowski, Bodini, D. Statistics of lambda-terms 9 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems What is “random”? Thanks to previous talks Natural size notion of lambda-term. Stay tuned for the definition and comparison to other models. Sample lambda-terms of size n uniformly ( leitmotif of this talk, but not the only possibility) Sample lambda-terms of size n and parameter value k uniformly. Bivariate generating function + tuning of Boltzmann sampler. Choose any subset of parameters, fix their values and sample at uniform from the desired set. [Bodini, Ponty ’10]: Newton iteration or asymptotic approximations � � log 2 ( size ) · #vars 7 · ( #vars+#eqs ) [Bodini, D. ’17]: Fast exact tuning in O . Bendkowski, Bodini, D. Statistics of lambda-terms 9 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems What is “random”? Thanks to previous talks Natural size notion of lambda-term. Stay tuned for the definition and comparison to other models. Sample lambda-terms of size n uniformly ( leitmotif of this talk, but not the only possibility) Sample lambda-terms of size n and parameter value k uniformly. Bivariate generating function + tuning of Boltzmann sampler. Choose any subset of parameters, fix their values and sample at uniform from the desired set. [Bodini, Ponty ’10]: Newton iteration or asymptotic approximations � � log 2 ( size ) · #vars 7 · ( #vars+#eqs ) [Bodini, D. ’17]: Fast exact tuning in O . Bendkowski, Bodini, D. Statistics of lambda-terms 9 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems What is “random”? Thanks to previous talks Natural size notion of lambda-term. Stay tuned for the definition and comparison to other models. Sample lambda-terms of size n uniformly ( leitmotif of this talk, but not the only possibility) Sample lambda-terms of size n and parameter value k uniformly. Bivariate generating function + tuning of Boltzmann sampler. Choose any subset of parameters, fix their values and sample at uniform from the desired set. [Bodini, Ponty ’10]: Newton iteration or asymptotic approximations � � log 2 ( size ) · #vars 7 · ( #vars+#eqs ) [Bodini, D. ’17]: Fast exact tuning in O . Bendkowski, Bodini, D. Statistics of lambda-terms 9 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems Closed lambda-terms? ? λ λ The value of each index shouldn’t exceed maximal unary distance λ to parent lambda. @ @ @ 3 0 1 0 Bendkowski, Bodini, D. Statistics of lambda-terms 10 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems m -open lambda-terms Def. A lambda-term T is m-open if λ m T is closed. Observation. m = 0 corresponds to closed terms Def. L m — class of m -open lambda-terms. Def. L ∞ — class of plain lambda-terms. Observation. L 0 ⊂ L 1 ⊂ L 2 ⊂ . . . ⊂ L ∞ Bendkowski, Bodini, D. Statistics of lambda-terms 11 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems m -open lambda-terms Def. A lambda-term T is m-open if λ m T is closed. Observation. m = 0 corresponds to closed terms Def. L m — class of m -open lambda-terms. Def. L ∞ — class of plain lambda-terms. Observation. L 0 ⊂ L 1 ⊂ L 2 ⊂ . . . ⊂ L ∞ Bendkowski, Bodini, D. Statistics of lambda-terms 11 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems m -open lambda-terms Def. A lambda-term T is m-open if λ m T is closed. Observation. m = 0 corresponds to closed terms Def. L m — class of m -open lambda-terms. Def. L ∞ — class of plain lambda-terms. Observation. L 0 ⊂ L 1 ⊂ L 2 ⊂ . . . ⊂ L ∞ Bendkowski, Bodini, D. Statistics of lambda-terms 11 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems m -open lambda-terms Def. A lambda-term T is m-open if λ m T is closed. Observation. m = 0 corresponds to closed terms Def. L m — class of m -open lambda-terms. Def. L ∞ — class of plain lambda-terms. Observation. L 0 ⊂ L 1 ⊂ L 2 ⊂ . . . ⊂ L ∞ Bendkowski, Bodini, D. Statistics of lambda-terms 11 / 31
Problem and Motivation Statistics of lambda-terms Plain and closed lambda-terms Open problems m -open lambda-terms Def. A lambda-term T is m-open if λ m T is closed. Observation. m = 0 corresponds to closed terms Def. L m — class of m -open lambda-terms. Def. L ∞ — class of plain lambda-terms. Observation. L 0 ⊂ L 1 ⊂ L 2 ⊂ . . . ⊂ L ∞ Bendkowski, Bodini, D. Statistics of lambda-terms 11 / 31
Recommend
More recommend