Suspending and Resuming Computations in Engines for SLG Evaluation

  • Authors:
  • Luís Fernando Castro;Terrance Swift;David Scott Warren

  • Affiliations:
  • -;-;-

  • Venue:
  • PADL '02 Proceedings of the 4th International Symposium on Practical Aspects of Declarative Languages
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

SLD resolution, the evaluation mechanism for Prolog programs, is modeled as a sequence of SLD trees. Since only one branch of an SLD tree needs to be active at any time, SLD can be implemented via engines whose memory management is stack-based, as the WAM. Tabling, and more specifically SLG resolution, is modeled as a sequence of forests of trees in which several computation paths may need to be active at any time. This reflects the fact that a computation path that consumes answers may need to be suspended and resumed multiple times as answers are derived.The SLGWAM architecture defines instructions to implement SLG resolution. Implementations of the SLGWAM architecture have so far shown a great deal of similarity in table access methods, high-level scheduling strategies, and support for incremental completion. However they have made different choices in what may be termed environment management: how to store suspended environments and how to check whether these environments need to be resumed. This paper describes the environment management techniques of different implementations of the SLGWAM architecture and analyzes their performance.