Boltzmann Samplers for Closed Simply-Typed Lambda Terms
Boltzmann Samplers for Closed Simply-Typed Lambda Terms
复制标题
用于封闭式简单类型 Lambda 项的玻尔兹曼采样器
DOI:
10.1007/978-3-319-51676-9_8
复制
发表时间:
2017
期刊:
影响因子:
--
通讯作者:
Paul Tarau
中科院分区:
文献类型:
--
作者:
Maciej Bendkowski;Katarzyna Grygiel;Paul Tarau
Simply-typed lambda terms are often used in the internal language of compilers and proof assistants, for which generation of large, uniformly distributed random terms is instrumental for testing correctness and scalability. Recently, Boltzmann samplers have enabled uniform random generation of large terms belonging to several families of combinatorial objects that have a regular structure, amenable to methods from analytic combinatorics. Unfortunately, no closed formula or generating function facilitating such methods is known for closed simply-typed lambda terms. Moreover, given their asymptotic sparsity in the family of closed lambda terms, filtering simply-typed terms in the much larger set of terms generated by a Boltzmann sampler becomes quickly intractable. By taking advantage of the synergy between logic variables, unification with occurs check and efficient backtracking in today’s Prolog systems we advance this technique to term sizes interesting not only for correctness but also for scalability tests, by deriving Boltzmann samplers returning in a few seconds simply-typed random lambda terms of size 120 and above. We also apply our techniques to the generation of uniformly random closed simply-typed normal forms and give some hints on pushing them further via parallel execution algorithms.