闭型简单$λ$项的随机生成:逻辑程序设计与玻尔兹曼采样器之间的协同作用
Random generation of closed simply-typed $λ$-terms: a synergy between logic programming and Boltzmann samplers
摘要:
软件质量保证的一种自然方法是编写单元测试,以保护程序员声明的代码不变量。在整个文献中,大量的工作都致力于使这一劳动密集型过程自动化的工具和技术。一个突出的例子是随机性的成功使用,特别是随机类型的$λ$ -terms,在测试函数式编程编译器,如格拉斯哥Haskell编译器。不幸的是,由于固有的困难的组合结构的类型$λ$ -条款没有有效的均匀抽样方法是已知的,设置它作为一个基本的开放问题,在随机软件测试方法。在本文中,我们结合了玻尔兹曼采样器,一个强大的随机组合结构生成技术的框架,与今天的Prolog系统提供逻辑变量之间的协同作用,统一与发生检查和有效的回溯。这使我们能够开发一种新的采样机制,能够构建均匀随机封闭的简单类型的$λ$ -项的大小为120。我们应用我们的技术来产生均匀随机封闭的简单类型的范式和设计一个并行执行机制,推动可实现的长期规模为140。逻辑程序设计理论与实践(TPLP)
英文摘要:
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 check and efficient backtracking. This allows us to develop a novel sampling mechanism able to construct uniformly random closed simply-typed $λ$-terms of up size 120. We apply our techniques to the generation of uniformly random closed simply-typed normal forms and design a parallel execution mechanism pushing forward the achievable term size to 140. Under consideration in Theory and Practice of Logic Programming (TPLP).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。