arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 0911.5203cs.PL
收藏

基于高阶模式统一的Lambda Prolog语言的实现

An Implementation of the Language Lambda Prolog Organized around Higher-Order Pattern Unification

Xiaochu Qi

摘要:

本论文关注Lambda Prolog的实现,Lambda Prolog是一种高阶逻辑程序设计语言,它支持用二叉树语法方法来表示和操作形式语法对象。Lambda Prolog通过使用类型化的lambda术语作为数据结构来扩展类似Prolog的语言来实现其功能,然后通过高阶统一和一些新的程序级抽象机制来操纵这些数据结构。这些额外的功能提出了新的实现问题,必须充分解决Lambda Prolog作为一个有效的编程工具。我们在这里考虑这些问题,最终提供一个虚拟机和基于编译的实现。一个关键的想法是Lambda Prolog的计算模型的方向围绕一个限制版本的高阶统一,具有良好的算法特性,似乎包括最有趣的应用程序。我们的虚拟机嵌入了沃伦抽象机的结构,是在传统的Prolog实现中使用的这种形式的统一的治疗。一路上,我们对待各种辅助问题,如低层次的表示lambda条款,实施减少这些条款和优化处理的类型计算。我们还开发了Lambda Prolog的实际实现,称为Teyjus版本2。该系统的一个特点是用C语言实现了虚拟机的仿真器,用OCaml语言实现了编译器。我们提出了一种治疗的软件问题,从这种混合的语言在一个系统中,我们讨论了相关的问题,我们的虚拟机仿真器的可移植性在任意架构。最后,我们通过使用该系统进行的实验来评估我们的各种设计思想的有效性。

英文摘要:

This thesis concerns the implementation of Lambda Prolog, a higher-order logic programming language that supports the lambda-tree syntax approach to representing and manipulating formal syntactic objects. Lambda Prolog achieves its functionality by extending a Prolog-like language by using typed lambda terms as data structures that it then manipulates via higher-order unification and some new program-level abstraction mechanisms. These additional features raise new implementation questions that must be adequately addressed for Lambda Prolog to be an effective programming tool. We consider these questions here, providing eventually a virtual machine and compilation based realization. A key idea is the orientation of the computation model of Lambda Prolog around a restricted version of higher-order unification with nice algorithmic properties and appearing to encompass most interesting applications. Our virtual machine embeds a treatment of this form of unification within the structure of the Warren Abstract Machine that is used in traditional Prolog implementations. Along the way, we treat various auxiliary issues such as the low-level representation of lambda terms, the implementation of reduction on such terms and the optimized processing of types in computation. We also develop an actual implementation of Lambda Prolog called Teyjus Version 2. A characteristic of this system is that it realizes an emulator for the virtual machine in the C language a compiler in the OCaml language. We present a treatment of the software issues that arise from this kind of mixing of languages within one system and we discuss issues relevant to the portability of our virtual machine emulator across arbitrary architectures. Finally, we assess the the efficacy of our various design ideas through experiments carried out using the system.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑