arXivDaily arXiv每日学术速递 周一至周五更新
arXiv cs/0003046cs.AIcs.LO
收藏

基于Prolog控制策略的线性表归结

Linear Tabulated Resolution Based on Prolog Control Strategy

Yi-Dong Shen, Li-Yan Yuan, Jia-Huai You, Neng-Fa Zhou

摘要:

无限循环和冗余计算是Prolog语言中公认的开放问题。已经探索了两种方法来解决这些问题:循环检查和制表。循环检查可以切断无限循环,但即使对于无函数的逻辑程序,它也不能既可靠又完整。表法是解决无限循环和冗余计算的有效方法。然而,现有的制表分辨率(诸如OLDT分辨率、SLG分辨率和制表SLS分辨率)是非线性的,因为它们在制定制表时依赖于解查找模式。非线性解析的主要缺点是它们不能使用简单的基于堆栈的内存结构(如Prolog中的内存结构)来实现。此外,一些严格的顺序运算符(如cuts)可能不像Prolog那样容易处理。在本文中,我们提出了一种混合方法来解决无限循环和冗余计算。我们结合循环检查和制表的思想,建立一个线性制表决议称为TP-决议。TP-归结有两个显著的特点:(1)它与Prolog一样进行线性列表推导,只是打破了无限循环,减少了冗余计算。它像Prolog一样有效地处理切割。(2)它对于具有有界项大小性质的正逻辑程序是可靠的和完备的。底层算法可以通过扩展到任何现有的Prolog抽象机(如WAM或ATOAM)来实现。

英文摘要:

Infinite loops and redundant computations are long recognized open problems in Prolog. Two ways have been explored to resolve these problems: loop checking and tabling. Loop checking can cut infinite loops, but it cannot be both sound and complete even for function-free logic programs. Tabling seems to be an effective way to resolve infinite loops and redundant computations. However, existing tabulated resolutions, such as OLDT-resolution, SLG- resolution, and Tabulated SLS-resolution, are non-linear because they rely on the solution-lookup mode in formulating tabling. The principal disadvantage of non-linear resolutions is that they cannot be implemented using a simple stack-based memory structure like that in Prolog. Moreover, some strictly sequential operators such as cuts may not be handled as easily as in Prolog. In this paper, we propose a hybrid method to resolve infinite loops and redundant computations. We combine the ideas of loop checking and tabling to establish a linear tabulated resolution called TP-resolution. TP-resolution has two distinctive features: (1) It makes linear tabulated derivations in the same way as Prolog except that infinite loops are broken and redundant computations are reduced. It handles cuts as effectively as Prolog. (2) It is sound and complete for positive logic programs with the bounded-term-size property. The underlying algorithm can be implemented by an extension to any existing Prolog abstract machines such as WAM or ATOAM.

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

↑