Finite representation of infinite query answers
- Kansas State Univ., Manhattan, KS (United States)
We define here a formal notion of finite representation of infinite query answers in logic programs. We apply this notion to Datalog[sub nS] (Datalog with n successors): an extension of Datalog capable of representing infinite phenomena like flow of time or plan construction. Predicates in Datalog[sub nS] can have arbitrary unary and limited n-ary function symbols in one fixed position. This class of logic programs is known to be decidable. However, least Herbrand models of Datalog[sub nS] programs may be infinite and consequently queries may have infinite answers. We present a method to finitely represent infinite least Herbrand models of Datalog[sub nS] programs as relational specifications. A relational specification consists of a finite set of facts and a finitely specified congruence relation. A relational specification has the following desirable properties: First, it is explicit in the sense that once it is computed, the original Datalog[sub nS] program (and its underlying computational engine) can be forgotten. Given a query to be evaluated, it is easy to obtain from the relational specification finitely many answer substitutions that represent infinitely many answer substitutions to the query. The method involved is a combination of a simple, unificationless, computational mechanism (graph traversal, congruence closure, or term rewriting) and standard relational query evaluation methods. Second, a relational specification is effectively computable and its computation is no harder, in the sense of the complexity class, than answering yet-no queries. Our method is applicable to every range-restricted Datalog[sub nS] program. We also show that for some very simple non-Datalog[sub nS] logic programs, finite representations of query answers do not exist. 50 refs.
- OSTI ID:
- 7049030
- Journal Information:
- ACM Transactions on Database Systems (Association for Computing Machinery); (United States), Journal Name: ACM Transactions on Database Systems (Association for Computing Machinery); (United States) Vol. 18:2; ISSN 0362-5915; ISSN ATDSD3
- Country of Publication:
- United States
- Language:
- English
Similar Records
Datalog: A self-contained tutorial (Part 2)
Datalog; a self-contained tutorial (Part 1)