Random generation of closed simply-typed $\lambda$-terms: a synergy between logic programming and Boltzmann samplers
Maciej Bendkowski, Katarzyna Grygiel, Paul Tarau

TL;DR
This paper introduces a novel method combining Boltzmann samplers and Prolog to generate uniformly random closed simply-typed lambda-terms, advancing the ability to test functional programming compilers with larger terms.
Contribution
It presents the first effective uniform sampling technique for closed simply-typed lambda-terms using Boltzmann samplers integrated with logic programming.
Findings
Generated lambda-terms up to size 120 using the new method.
Extended generation to size 140 with parallel execution.
Demonstrated the approach's potential for software testing.
Abstract
A natural approach to software quality assurance consists in writing unit tests securing programmer-declared code invariants. Throughout the literature a great body of work has been devoted to tools and techniques automating this labour-intensive process. A prominent example is the successful use of randomness, in particular random typeable -terms, in testing functional programming compilers such as the Glasgow Haskell Compiler. Unfortunately, due to the intrinsically difficult combinatorial structure of typeable -terms no effective uniform sampling method is known, setting it as a fundamental open problem in the random software testing approach. In this paper we combine the framework of Boltzmann samplers, a powerful technique of random combinatorial structure generation, with today's Prolog systems offering a synergy between logic variables, unification with occurs…
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 · Natural Language Processing Techniques · Software Engineering Research
