49,455 research outputs found
On the enumeration of closures and environments with an application to random generation
Environments and closures are two of the main ingredients of evaluation in
lambda-calculus. A closure is a pair consisting of a lambda-term and an
environment, whereas an environment is a list of lambda-terms assigned to free
variables. In this paper we investigate some dynamic aspects of evaluation in
lambda-calculus considering the quantitative, combinatorial properties of
environments and closures. Focusing on two classes of environments and
closures, namely the so-called plain and closed ones, we consider the problem
of their asymptotic counting and effective random generation. We provide an
asymptotic approximation of the number of both plain environments and closures
of size . Using the associated generating functions, we construct effective
samplers for both classes of combinatorial structures. Finally, we discuss the
related problem of asymptotic counting and random generation of closed
environemnts and closures
Counting Environments and Closures
Environments and closures are two of the main ingredients of evaluation in lambda-calculus. A closure is a pair consisting of a lambda-term and an environment, whereas an environment is a list of lambda-terms assigned to free variables. In this paper we investigate some dynamic aspects of evaluation in lambda-calculus considering the quantitative, combinatorial properties of environments and closures. Focusing on two classes of environments and closures, namely the so-called plain and closed ones, we consider the problem of their asymptotic counting and effective random generation. We provide an asymptotic approximation of the number of both plain environments and closures of size n. Using the associated generating functions, we construct effective samplers for both classes of combinatorial structures. Finally, we discuss the related problem of asymptotic counting and random generation of closed environments and closures
On Uniquely Closable and Uniquely Typable Skeletons of Lambda Terms
Uniquely closable skeletons of lambda terms are Motzkin-trees that
predetermine the unique closed lambda term that can be obtained by labeling
their leaves with de Bruijn indices. Likewise, uniquely typable skeletons of
closed lambda terms predetermine the unique simply-typed lambda term that can
be obtained by labeling their leaves with de Bruijn indices.
We derive, through a sequence of logic program transformations, efficient
code for their combinatorial generation and study their statistical properties.
As a result, we obtain context-free grammars describing closable and uniquely
closable skeletons of lambda terms, opening the door for their in-depth study
with tools from analytic combinatorics.
Our empirical study of the more difficult case of (uniquely) typable terms
reveals some interesting open problems about their density and asymptotic
behavior.
As a connection between the two classes of terms, we also show that uniquely
typable closed lambda term skeletons of size are in a bijection with
binary trees of size .Comment: Pre-proceedings paper presented at the 27th International Symposium
on Logic-Based Program Synthesis and Transformation (LOPSTR 2017), Namur,
Belgium, 10-12 October 2017 (arXiv:1708.07854
Asymptotically almost all \lambda-terms are strongly normalizing
We present quantitative analysis of various (syntactic and behavioral)
properties of random \lambda-terms. Our main results are that asymptotically
all the terms are strongly normalizing and that any fixed closed term almost
never appears in a random term. Surprisingly, in combinatory logic (the
translation of the \lambda-calculus into combinators), the result is exactly
opposite. We show that almost all terms are not strongly normalizing. This is
due to the fact that any fixed combinator almost always appears in a random
combinator
Boltzmann samplers for random generation of lambda terms
Randomly generating structured objects is important in testing and optimizing
functional programs, whereas generating random -terms is more specifically
needed for testing and optimizing compilers. For that a tool called QuickCheck
has been proposed, but in this tool the control of the random generation is
left to the programmer. Ten years ago, a method called Boltzmann samplers has
been proposed to generate combinatorial structures. In this paper, we show how
Boltzmann samplers can be developed to generate lambda-terms, but also other
data structures like trees. These samplers rely on a critical value which
parameters the main random selector and which is exhibited here with
explanations on how it is computed. Haskell programs are proposed to show how
samplers are actually implemented
Some Properties of a class of stochastic heat equations
We study stochastic heat equations of the forms [\partial_t u-\sL u]\d t\d x=\lambda\int_\R\sigma(u,h)\tilde{N}(\d t,\d x,\d h),
and [\partial_t u-\sL u]\d t\d x=\lambda\int_{\R^d}\sigma(u,h)N(\d t,\d x,\d h). Here, is a non-random initial function, a Poisson random measure with its intensity \d t\d x\nu(\d h) and \nu(\d h) a L\'{e}vy measure; is the compensated Poisson random measure and \sL a generator of a L\'{e}vy process. The function is Lipschitz continuous and the noise level. The above discontinuous noise driven equations are not always easy to handle. They are discontinuous analogues of the equation introduced in \cite{Foondun} and also more general than those considered in \cite{Saint}. We do not only compare the growth moments of the two equations with each other but also compare them with growth moments of the class of equations studied in \cite{Foondun}. Some of our results are significant generalisations of those given in \cite{Saint} while the rest are completely new.
Second and first growth moments properties and estimates were obtained under some linear growth conditions on . We also consider \sL:=-(-\Delta)^{\alpha/2}, the generator of -stable processes and use some explicit bounds on its corresponding fractional heat kernel to obtain more precise results.
We also show that when the solutions satisfy some non-linear growth conditions on , the solutions cease to exist for both compensated and non-compensated noise terms for different conditions on the initial function .
We consider also fractional heat equations of the form where denotes the Gaussian coloured noise. Under suitable assumptions, we show that the second moment \E|u(t,x)|^2 of the solution grows exponentially with time. In particular we give an affirmative answer to the open problem posed in \cite{Conus3}: given a positive function on a set of positive measure, does \sup_{x\in\R^d}\E|u(t,x)|^2 grow exponentially with time? Consequently we give the precise growth rate with respect to the parameter
Counting and Generating Terms in the Binary Lambda Calculus (Extended version)
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.Comment: extended version of arXiv:1401.037
- …