Query evaluation under the well-founded semantics

  • Authors:
  • Weidong Chen;David S. Warren

  • Affiliations:
  • -;-

  • Venue:
  • PODS '93 Proceedings of the twelfth ACM SIGACT-SIGMOD-SIGART symposium on Principles of database systems
  • Year:
  • 1993

Quantified Score

Hi-index 0.00

Visualization

Abstract

SLD resolution with negation as finite failure (or SLDNF) reflects the procedural interpretation of Horn-clause predicate logic as a programming language and forms the computational basis for prolog systems. Despite its advantages in memory management, SLDNF is often not appropriate for query evaluation for three reasons; a) it may not terminate due to infinite positive recursion; b) it may not terminate due to infinite recursion through negation; and c) it may repeatedly evaluate the same clause body literal, leading to unacceptable performance.We address all three problems for goal-oriented query evaluation of arbitrary programs by presenting an extension of SLDNF, called SLG resolution, with the following distinctive features:(i) SLG resolution is a partial deduction procedure, consisting of several transformations. Each query is transformed step by step into a set of answer clauses;(ii) SLG resolution is sound and ideally complete for all non-floundering queries with respect to all three-valued stable models (including the well founded partial model);(iii) SLG resolution allows an arbitrary computation rule and an arbitrary control strategy for selecting transformations to apply;(iv) SLG resolution avoids both positive and negative loops and always terminates for programs with the bounded-term-size property;(v) SLG resolution has a polynomial time data complexity for well founded negation.Restricted forms of SLG resolution are identified for definite, locally stratified, and modularly stratified programs, thereby shedding light on the role each transformation plays. To provide answers to a query under different three-valued stable models, SLG resolution can be enhanced by further processing of the derived set of answer clauses.SLG resolution makes many more clausal specifications into effective programs. With simple (user or computer generated) annotations, SLDNF resolution and SLG resolution can be fully integrated. Thus a system including SLG resolution can be fully integrated. Thus a system including SLG resolution is naturally upward compatible with Prolog. For all these reasons we believe that SLG resolution will provide the computational basis for the next generation of logic programming systems.