FINITE REPRESENTATION OF INFINITE QUERY ANSWERS

被引:39
作者
CHOMICKI, J [1 ]
IMIELINSKI, T [1 ]
机构
[1] RUTGERS UNIV,DEPT COMP SCI,NEW BRUNSWICK,NJ 08903
来源
ACM TRANSACTIONS ON DATABASE SYSTEMS | 1993年 / 18卷 / 02期
关键词
COMPUTATIONAL COMPLEXITY; DATALOG; DECIDABILITY; LOGIC PROGRAMMING; NON-HERBRAND MODELS; NONSTANDARD QUERY ANSWERS; QUERY PROCESSING; SAFETY;
D O I
10.1145/151634.151635
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
We define here a formal notion of finite representation of infinite query answers in logic programs. We apply this notion to Datalog(nS) (Datalog with n successors): an extension of Datalog capable of representing infinite phenomena like flow of time or plan construction. Predicates in Datalog(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(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) 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(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.
引用
收藏
页码:181 / 223
页数:43
相关论文
共 51 条
  • [1] TEMPORAL LOGIC PROGRAMMING
    ABADI, M
    MANNA, Z
    [J]. JOURNAL OF SYMBOLIC COMPUTATION, 1989, 8 (03) : 277 - 295
  • [2] AIELLO L, 1989, F KNOWLEDGE BASE MAN, P179
  • [3] BANCILHON F, 1986, ACM SIGMOD INT C MAN
  • [4] BAUDINET M, 1991, ACM SIGACT SIGMOD SI
  • [5] BAUDINET M, 1991, UNPUB EXPRESSIVENESS
  • [6] BAUDINET M, 1989, ACM SIGACT SIGPLAN S
  • [7] BEZEM M, 1989, N AM C LOGIC PROGRAM
  • [8] BLAIR HA, 1986, UNPUB WORKSHOP F DED
  • [9] HORN CLAUSE QUERIES AND GENERALIZATIONS.
    Chandra, Ashok K.
    Harel, David
    [J]. Journal of Logic Programming, 1985, 2 (01): : 1 - 15
  • [10] COMPUTABLE QUERIES FOR RELATIONAL DATA-BASES
    CHANDRA, AK
    HAREL, D
    [J]. JOURNAL OF COMPUTER AND SYSTEM SCIENCES, 1980, 21 (02) : 156 - 178