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

逻辑程序设计中高阶特征的处理

A treatment of higher-order features in logic programming

Gopalan Nadathur

摘要:

逻辑编程范式为高阶概念的新内涵视图提供了基础。这种观点主要是通过使用类型化λ演算的项作为表示设备,并通过使用更丰富的统一形式来探测它们的结构来实现的。这些增加有重要的元编程应用,但它们也带来了重要的实现问题。一个问题涉及适合于其预期用途:除了支持通常的归约计算之外,适当的编码还必须促进对项的比较操作。另一方面涉及具有分支特征并且有时要求延迟统一问题的解决的统一操作的处理。最后一个问题涉及到目标的执行,这些目标的结构只有在计算过程中才变得明显。本文揭示了这些问题,并描述了解决这些问题的方法。一个令人满意的表示lambda条款开发的无名符号de Bruijn以及明确的编码替代。特殊的机制被塑造成传统的Prolog实现的结构,以支持分支的统一和携带的统一问题在其他计算步骤;溢价是放在利用确定性和模仿通常的一阶行为在这种情况下。一个扩展的编译模型,对待高阶统一,也处理动态紧急的目标。这里描述的思想已经在Lambda Prolog语言的Teyjus实现中使用,这一事实被用来对其有效性进行初步评估。

英文摘要:

The logic programming paradigm provides the basis for a new intensional view of higher-order notions. This view is realized primarily by employing the terms of a typed lambda calculus as representational devices and by using a richer form of unification for probing their structures. These additions have important meta-programming applications but they also pose non-trivial implementation problems. One issue concerns the machine representation of lambda terms suitable to their intended use: an adequate encoding must facilitate comparison operations over terms in addition to supporting the usual reduction computation. Another aspect relates to the treatment of a unification operation that has a branching character and that sometimes calls for the delaying of the solution of unification problems. A final issue concerns the execution of goals whose structures become apparent only in the course of computation. These various problems are exposed in this paper and solutions to them are described. A satisfactory representation for lambda terms is developed by exploiting the nameless notation of de Bruijn as well as explicit encodings of substitutions. Special mechanisms are molded into the structure of traditional Prolog implementations to support branching in unification and carrying of unification problems over other computation steps; a premium is placed in this context on exploiting determinism and on emulating usual first-order behaviour. An extended compilation model is presented that treats higher-order unification and also handles dynamically emergent goals. The ideas described here have been employed in the Teyjus implementation of the Lambda Prolog language, a fact that is used to obtain a preliminary assessment of their efficacy.

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

↑