Finite Representation of In nite Query Answers

We deene here a formal notion of nite representation of innnite query answers in logic programs. We apply this notion to Datalog nS (Datalog with n successors): an extension of Datalog capable of representing innnite phenomena like ow of time or plan construction. Predicates in Datalog nS can have arbitrary unary and limited n-ary function symbols in one xed position. This class of logic programs is known to be decidable. However, least Herbrand models of Datalog nS programs may be innnite and consequently queries may have innnite answers. We present a method to nitely represent innnite least Herbrand models of Datalog nS programs as relational speciications. A relational speciication consists of a nite set of facts and a nitely speciied congruence relation. A relational speciication has the following desirable properties. First, it is explicit in the sense that once it is computed, the original 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 speciication nitely many answer substitutions that represent innnitely many answer substitutions to the query. The method involved is a combination of a simple, uniication-less, computational mechanism (graph traversal, congruence closure, or term rewriting) and standard relational query evaluation methods. Second, a relational speciication is eeectively 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, nite representations of query answers do not exist.

[1]  Thom W. Frühwirth,et al.  Logic programs as types for logic programs , 1991, [1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science.

[2]  Hong Chen,et al.  Logic Programming with Recurrence Domains , 1991, ICALP.

[3]  Peter Z. Revesz A Closed Form for Datalog Queries with Integer Order , 1990, ICDT.

[4]  Joxan Jaffar,et al.  A decision procedure for a class of set constraints , 1990, [1990] Proceedings. Fifth Annual IEEE Symposium on Logic in Computer Science.

[5]  Jan Chomicki,et al.  Functional deductive databases: query processing in the presence of limited function symbols , 1990 .

[6]  Joxan Jaffar,et al.  A finite presentation theorem for approximating logic programs , 1989, POPL '90.

[7]  Martín Abadi,et al.  Temporal Logic Programming , 1989, J. Symb. Comput..

[8]  Peter Z. Revesz,et al.  On the Relationship of Congruence Closure and Unification , 1989, DBPL.

[9]  Marianne Baudinet,et al.  Temporal logic programming is complete and expressive , 1989, POPL '89.

[10]  Marc Bezem,et al.  Characterizing Termination of Logic Programs with Level Mappings , 1989, NACLP.

[11]  Peter Padawitz,et al.  Computing in Horn Clause Theories , 1988, EATCS Monographs on Theoretical Computer Science.

[12]  Richard R. Muntz,et al.  Implicit Representation for Extensional Answers , 1988, Expert Database Conf..

[13]  Jeffrey D. Ullman,et al.  Principles of Database and Knowledge-Base Systems, Volume II , 1988, Principles of computer science series.

[14]  Kenneth Kunen,et al.  Negation in Logic Programming , 1987, J. Log. Program..

[15]  Tomasz Imielinski Domain Abstraction and Limited Reasoning , 1987, IJCAI.

[16]  Johann A. Makowsky,et al.  Why Horn Formulas Matter in Computer Science: Initial Structures and Generic Examples , 1987, J. Comput. Syst. Sci..

[17]  Abraham Silberschatz,et al.  Safety of recursive Horn clauses with infinite relations , 1987, PODS '87.

[18]  Tomasz Imielinski,et al.  Intelligent Query Answering in Rule Based Systems , 1988, J. Log. Program..

[19]  R. Ramakrishnan,et al.  An amateur's introduction to recursive query processing strategies , 1986, SIGMOD '86.

[20]  Robert Demolombe,et al.  Querying a Rule Base , 1986, Expert Database Conf..

[21]  Luigia Carlucci Aiello,et al.  Adding a Closure Operator to the Extended Relational Algebra: A Further Step Towards the Integration of Database Techniques and Logic Programming , 1985, Foundations of Knowledge Base Management.

[22]  David Harel,et al.  Horn Clauses Queries and Generalizations , 1985, J. Log. Program..

[23]  David A. Plaisted Complete Problems in the First-Order Predicate Calculus , 1984, J. Comput. Syst. Sci..

[24]  Francisco Corella Semantic Retrieval and Levels of Abstraction , 1984, Expert Database Workshop.

[25]  J. Lloyd Foundations of Logic Programming , 1984, Symbolic Computation.

[26]  Moshe Y. Vardi The complexity of relational query languages (Extended Abstract) , 1982, STOC '82.

[27]  Robert E. Tarjan,et al.  Variations on the Common Subexpression Problem , 1980, J. ACM.

[28]  David Harel,et al.  Computable Queries for Relational Data Bases , 1980, J. Comput. Syst. Sci..

[29]  Greg Nelson,et al.  Fast Decision Procedures Based on Congruence Closure , 1980, JACM.

[30]  Mitchell Wand,et al.  Final Algebra Semantics and Data Type Extensions , 1979, J. Comput. Syst. Sci..

[31]  Sten-Åke Tärnlund,et al.  Horn clause computability , 1977, BIT.

[32]  Dexter Kozen,et al.  Complexity of finitely presented algebras , 1977, STOC '77.

[33]  Robert A. Kowalski,et al.  The Semantics of Predicate Logic as a Programming Language , 1976, JACM.

[34]  Herbert B. Enderton,et al.  A mathematical introduction to logic , 1972 .

[35]  C. Cordell Green,et al.  Application of Theorem Proving to Problem Solving , 1969, IJCAI.