Complexity of nonrecursive logic programs with complex values

values should be treated. There are two major approaches. We investigate complexity of the SUCCESS problem for logic query languages with complex values: check whether a query defines a nonempty set. The SUCCESS problem for recursive query languages with complex values is undecidable, so WC study the complexity of nonrecursive queries. By complcx values we understand values such as trees, finite sets, and multlscts. Due to the well-known correspondence between relational query languages and datalog, our results can be considered as results about relational query languages with complex values. The paper gives a complete complexity classification of the SUCCESS problem for nonrecursive logic programs over trees depending on the underlying signature, presence of negation, and range restrictedness. We also prove several results about finite sets and multisets. 1. In constmint logic programming [41,42] and constraa’nt databases [33] any value is identified by the set of constraints true on this value. The addition of a new type of values requires the addition of new constraint predicates. A similar approach to relational query languages was also considered in [lo]. 2. Another approach to adding complex values, which can be called structuml, requires that values be represented by means of their structure. For example, to represent sets one may enrich the language with constant 0 to denote the empty set and the set constructor {sit} denoting the addition of an element s to the set t. Then the set (tl,. . . , {tll . . . {tnlO}. . .}. t,,} will be denoted by the term The only changes to the semantics of logic programming are the changes in the treatment of equality, since new predicate symbols are not free constructors. Such an approach is considered in a number of papers, for example [25,37,9,50,22,21,19].

[1]  Gabriel M. Kuper,et al.  Logic programming with sets , 1987, PODS '87.

[2]  Allen Van Gelder,et al.  Negation as Failure using Tight Derivations for General Logic Programs , 1988, J. Log. Program..

[3]  Jianwen Su,et al.  On the expressive power of database queries with intermediate types , 1988, PODS '88.

[4]  Vladimir Lifschitz,et al.  On the Declarative Semantics of Logic Programs with Negation , 1987, Foundations of Deductive Databases and Logic Programming..

[5]  Allen Van Gelder Negation as Failure using Tight Derivations for General Logic Programs , 1989, J. Log. Program..

[6]  Teodor C. Przymusinski On the Declarative Semantics of Deductive Databases and Logic Programs , 1988, Foundations of Deductive Databases and Logic Programming..

[7]  B. Dahn Admissible sets and structures , 1978 .

[8]  Krzysztof R. Apt,et al.  Logic Programming , 1990, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[9]  Michael J. Maher A Logic Programming View of CLP , 1993, ICLP.

[10]  Larry J. Stockmeyer,et al.  The Polynomial-Time Hierarchy , 1976, Theor. Comput. Sci..

[11]  Leonard Berman,et al.  Precise bounds for presburger arithmetic and the reals with addition: Preliminary report , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).

[12]  Catriel Beeri,et al.  Set Constructors in a Logic Database Language , 1991, J. Log. Program..

[13]  J. Ferrante,et al.  The computational complexity of logical theories , 1979 .

[14]  Michael J. Maher Complete axiomatizations of the algebras of finite, rational and infinite trees , 1988, [1988] Proceedings. Third Annual Information Symposium on Logic in Computer Science.

[15]  A. I. Malcev Axiomatizable classes of locally free algebras of various types , 1971 .

[16]  Moshe Y. Vardi On the Complexity of Bounded-Variable Queries. , 1995, PODS 1995.

[17]  John W. Lloyd,et al.  Foundations of Logic Programming, 1st Edition , 1984 .

[18]  Kenneth Kunen,et al.  Answer Sets and Negation-as-Failure , 1987, ICLP.

[19]  Mihalis Yannakakis,et al.  On the complexity of database queries (extended abstract) , 1997, PODS.

[20]  Gabriel M. Kuper,et al.  Logic programming with sets , 1987, J. Comput. Syst. Sci..

[21]  Jianwen Su,et al.  On the Expressive Power of Database Queries with Intermediate Types , 1991, J. Comput. Syst. Sci..

[22]  Neil Immerman,et al.  Languages that Capture Complexity Classes , 1987, SIAM J. Comput..

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

[24]  Mihalis Yannakakis,et al.  On the Complexity of Database Queries , 1999, J. Comput. Syst. Sci..

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

[26]  Agostino Dovier,et al.  A Language for Programming in Logic with Finite Sets , 1996, J. Log. Program..

[27]  Evgeny Dantsin,et al.  Complexity of Query Answering in Logic Databases with Complex Values , 1998 .

[28]  Albert R. Meyer,et al.  On time-space classes and their relation to the theory of real addition , 1978, STOC '78.

[29]  Journal of the Association for Computing Machinery , 1961, Nature.

[30]  Gabriel M. Kuper,et al.  Constraint Query Languages , 1995, J. Comput. Syst. Sci..

[31]  Michael Benedikt,et al.  Languages for relational databases over interpreted structures , 1997, PODS '97.

[32]  Albert R. Meyer The inherent computational complexity of theories of ordered sets , 1974 .

[33]  Sergei G. Vorobyov The "Hardest" natural decidable theory , 1997, Proceedings of Twelfth Annual IEEE Symposium on Logic in Computer Science.

[34]  Albert R. Meyer,et al.  Word problems requiring exponential time(Preliminary Report) , 1973, STOC.

[35]  Jean H. Gallier,et al.  Extending SLD Resolution to Equational Horn Clauses using E-Unification , 1989, J. Log. Program..

[36]  Gabriel M. Kuper,et al.  On the Complexity of Queries in the Logical Data Model , 1993, Theor. Comput. Sci..

[37]  Moshe Y. Vardi On the complexity of bounded-variable queries (extended abstract) , 1995, PODS '95.

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

[39]  Sergei G. Vorobyov An Improved Lower Bound for the Elementary Theories of Trees , 1996, CADE.

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

[41]  Carlo Zaniolo,et al.  Compilation of Set Terms in the Logic Data Language (LDL) , 1992, J. Log. Program..

[42]  J. W. Lloyd,et al.  Foundations of logic programming; (2nd extended ed.) , 1987 .

[43]  Hugo Volger Turing Machines with Linear Alternation, Theories of Bounded Concatenation and the Decision Problem of First Order Theories , 1983, Theor. Comput. Sci..

[44]  Jon Barwise,et al.  Admissible sets and structures , 1975 .

[45]  David S. Johnson,et al.  A Catalog of Complexity Classes , 1991, Handbook of Theoretical Computer Science, Volume A: Algorithms and Complexity.

[46]  Jianwen Su,et al.  Untyped sets, invention, and computable queries , 1989, PODS '89.

[47]  Michael J. Maher A CLP View of Logic Programming , 1992, ALP.

[48]  Adrian Walker,et al.  Towards a Theory of Declarative Knowledge , 1988, Foundations of Deductive Databases and Logic Programming..

[49]  Giorgio Levi,et al.  Declarative Modeling of the Operational Behavior of Logic Languages , 1989, Theor. Comput. Sci..

[50]  Neil Immerman,et al.  Relational Queries Computable in Polynomial Time , 1986, Inf. Control..

[51]  Leonard Berman,et al.  The Complexity of Logical Theories , 1980, Theor. Comput. Sci..

[52]  Chen C. Chang,et al.  Model Theory: Third Edition (Dover Books On Mathematics) By C.C. Chang;H. Jerome Keisler;Mathematics , 1966 .

[53]  Krzysztof R. Apt,et al.  Arithmetic classification of perfect models of stratified programs , 1991, Fundam. Informaticae.

[54]  Robert L. Vaught,et al.  Sentences true in all constructive models , 1960, Journal of Symbolic Logic.