Hostname: page-component-77c89778f8-cnmwb Total loading time: 0 Render date: 2024-07-18T18:05:06.070Z Has data issue: false hasContentIssue false

Linear tabulated resolution based on Prolog control strategy

Published online by Cambridge University Press:  03 April 2001

Department of Computer Science, Chongqing University, Chongqing 400044, People's Republic of China (e-mail:
Department of Computing Science, University of Alberta, Edmonton, Alberta, Canada T6G 2H1 (e-mail:,
Department of Computing Science, University of Alberta, Edmonton, Alberta, Canada T6G 2H1 (e-mail:,
Department of Computer and Information Science, Brooklyn College, The City University of New York, New York, NY 11210-2889, USA (e-mail:


Infinite loops and redundant computations are long recognized open problems in Prolog. Two methods 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; and (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.

Research Article
© 2001 Cambridge University Press

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)