Linear tabulated resolution based on Prolog control strategy

  • Authors:
  • Yi-Dong Shen;Li-Yan Yuan;Jia-Huai You;Neng-Fa Zhou

  • Affiliations:
  • Department of Computer Science, Chongqing University, Chongqing 400044, People's Republic of China (e-mail: ydshen@cs.ualberta.ca);Department of Computing Science, University of Alberta, Edmonton, Alberta, Canada T6G 2H1 (e-mail: yuan@cs.ualberta.ca, you@cs.ualberta.ca);Department of Computing Science, University of Alberta, Edmonton, Alberta, Canada T6G 2H1 (e-mail: yuan@cs.ualberta.ca, you@cs.ualberta.ca);Department of Computer and Information Science, Brooklyn College, The City University of New York, New York, NY 11210-2889, USA (e-mail: zhou@sci.brooklyn.cuny.edu)

  • Venue:
  • Theory and Practice of Logic Programming
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.