Finite representation of infinite query answers
- 1 June 1993
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Database Systems
- Vol. 18 (2) , 181-223
- https://doi.org/10.1145/151634.151635
Abstract
We define here a formal notion of finite representation of infinite query answers in logic programs. We apply this notion to Datalog 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 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 yes-no queries. Our method is applicable to every range-restricted Datalog nS program. We also show that for some very simple non-Datalog nS logic programs, finite representations of query answers do not exist.Keywords
This publication has 25 references indexed in Scilit:
- On the representation of infinite temporal data and queries (extended abstract)Published by Association for Computing Machinery (ACM) ,1991
- Temporal logic programmingJournal of Symbolic Computation, 1989
- Intelligent query answering in rule based systemsThe Journal of Logic Programming, 1987
- Complete problems in the first-order predicate calculusJournal of Computer and System Sciences, 1984
- Computable queries for relational data basesJournal of Computer and System Sciences, 1980
- Variations on the Common Subexpression ProblemJournal of the ACM, 1980
- Fast Decision Procedures Based on Congruence ClosureJournal of the ACM, 1980
- Final algebra semantics and data type extensionsJournal of Computer and System Sciences, 1979
- Horn clause computabilityBIT Numerical Mathematics, 1977
- The Semantics of Predicate Logic as a Programming LanguageJournal of the ACM, 1976