Efficient top-down computation of queries under the well-founded semantics

Weidong Chen, Terrance Swift, David S. Warren

Research output: Contribution to journalArticle

Abstract

The well-founded model provides a natural and robust semantics for logic programs with negative literals in rule bodies. Although various procedural semantics have been proposed for query evaluation under the well-founded semantics, the practical issues of implementation for effective and efficient computation of queries have been rarely discussed. This paper investigates two major implementation issues of query evaluation under the well-founded semantics, namely, (a) to ensure that negative literals be resolved only after their positive counterparts have been completely evaluated, and (b) to detect and handle potential negative loops. We present efficient incremental algorithms for maintaining positive and negative dependencies among subgoals in a top-down evaluation. Both completely evaluated subgoals and potential negative loops are detected by inspecting the dependency information of a single subgoal. Our implementation can be viewed as an effective successor to SLDNF resolution, extending Prolog computation in a natural and smooth way.

Original languageEnglish (US)
Pages (from-to)161-199
Number of pages39
JournalThe Journal of Logic Programming
Volume24
Issue number3
DOIs
Publication statusPublished - 1995
Externally publishedYes

    Fingerprint

ASJC Scopus subject areas

  • Logic

Cite this