Logic Programming and Parallel Complexity

This paper is a survey of the many applications of the theory of parallel algorithms and complexity to logic programming problems. The mathematical tools relevant to the analysis of parallel logic programs include: the concept of alternation, the complexity class NC, and parallel algorithms using randomization and/or achieving optimal speed-ups. The logic programming problems addressed are related to query optimization for deductive databases and to fast parallel execution of primitive operations in logic programming languages, such as, fixpoint operators, term unification, and term matching. The formal language we use to illustrate the addition of recursion to database queries is the language of logical query programs (or programs), whose evaluation has been the object of much recent research. Our presentation highlights the fact that all of these results can be stated using the stage function sH(n) of a program H, where n is the size of the database queried. In this context we also present two new observations. (1) Given a linear single rule program H, it is NP-hard to decide whether sH(n)=O(1); this extends the bounded recursion analysis of[57, 42]. (2) There is a program that can be evaluated in s(n)=O(log n) stages, but whose derivation trees (of width 1) are of size exponential in n. An extension of derivation trees from width 1 to constant width properly strengthens the fast evaluation method of [76].

[1]  Vladimir Yu. Sazonov,et al.  A Logical Approach to the Problem "P=NP?" , 1980, MFCS.

[2]  Jacob T. Schwartz,et al.  Fast Probabilistic Algorithms for Verification of Polynomial Identities , 1980, J. ACM.

[3]  M. Rabin Probabilistic algorithm for testing primality , 1980 .

[4]  Keith L. Clark,et al.  A relational language for parallel programming , 1981, FPCA '81.

[5]  Jeffrey F. Naughton,et al.  A decidable class of bounded recursions , 1987, PODS '87.

[6]  E. F. Codd,et al.  A relational model of data for large shared data banks , 1970, CACM.

[7]  Ronald Fagin,et al.  Monadic generalized spectra , 1975, Math. Log. Q..

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

[9]  Neil Immerman,et al.  Relational queries computable in polynomial time (Extended Abstract) , 1982, STOC '82.

[10]  Neil D. Jones,et al.  Complete problems for deterministic polynomial time , 1974, Symposium on the Theory of Computing.

[11]  Krzysztof R. Apt,et al.  Contributions to the Theory of Logic Programming , 1982, JACM.

[12]  Yiannis N. Moschovakis,et al.  Global inductive definability , 1978, Journal of Symbolic Logic.

[13]  Richard Cole,et al.  Deterministic coin tossing and accelerating cascades: micro and macro techniques for designing parallel algorithms , 1986, STOC '86.

[14]  Yuri Gurevich,et al.  A Logic for Constant-Depth Circuits , 1984, Inf. Control..

[15]  Don Coppersmith,et al.  On the Asymptotic Complexity of Matrix Multiplication , 1982, SIAM J. Comput..

[16]  Eli Upfal,et al.  Constructing a perfect matching is in random NC , 1985, STOC '85.

[17]  Ehud Shapiro,et al.  A subset of Concurrent Prolog and its interpreter , 1988 .

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

[19]  Alberto Martelli,et al.  An Efficient Unification Algorithm , 1982, TOPL.

[20]  Neil Immerman,et al.  Number of Quantifiers is Better Than Number of Tape Cells , 1981, J. Comput. Syst. Sci..

[21]  David Maier,et al.  Magic sets and other strange ways to implement logic programs (extended abstract) , 1985, PODS '86.

[22]  Jack Minker,et al.  On recursive axioms in deductive databases , 1983, Inf. Syst..

[23]  Jack Minker,et al.  Logic and Databases: A Deductive Approach , 1984, CSUR.

[24]  Mikhail J. Atallah,et al.  Solving Tree Problems on a Mesh-Connected Processor Array (Preliminary Version) , 1985, FOCS.

[25]  Alfred V. Aho,et al.  Universality of data retrieval languages , 1979, POPL.

[26]  David Harel,et al.  A Programming Language for the Inductive Sets, and Applications , 1984, Inf. Control..

[27]  Michel de Rougemont,et al.  Uniform definability on finite structures with successor , 1984, STOC '84.

[28]  I. V. Ramakrishnan,et al.  An Efficient Parallel Algorithm for Term Matching , 1986, FSTTCS.

[29]  John H. Reif,et al.  An optimal parallel algorithm for integer sorting , 1985, 26th Annual Symposium on Foundations of Computer Science (sfcs 1985).

[30]  Walter L. Ruzzo,et al.  Tree-size bounded alternation(Extended Abstract) , 1979, J. Comput. Syst. Sci..

[31]  Stavros S. Cosmadakis,et al.  Parallel evaluation of recursive rule queries , 1985, PODS '86.

[32]  Neil Immerman Languages which capture complexity classes , 1983, STOC '83.

[33]  L. Goldschlager The monotone and planar circuit value problems are log space complete for P , 1977, SIGA.

[34]  Carlo Zaniolo,et al.  On the implementation of a simple class of logic queries for databases , 1985, PODS.

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

[36]  Mike Paterson,et al.  Linear unification , 1976, STOC '76.

[37]  G. Huet,et al.  Equations and rewrite rules: a survey , 1980 .

[38]  David Harel,et al.  Structure and complexity of relational queries , 1980, 21st Annual Symposium on Foundations of Computer Science (sfcs 1980).

[39]  Walter L. Ruzzo On Uniform Circuit Complexity , 1981, J. Comput. Syst. Sci..

[40]  William F. Clocksin,et al.  Programming in Prolog , 1981, Springer Berlin Heidelberg.

[41]  Yiannis N. Moschovakis,et al.  Elementary induction on abstract structures , 1974 .

[42]  J. A. Robinson,et al.  A Machine-Oriented Logic Based on the Resolution Principle , 1965, JACM.

[43]  Keith L. Clark,et al.  Negation as Failure , 1987, Logic and Data Bases.

[44]  Robert E. Tarjan,et al.  An Efficient Parallel Biconnectivity Algorithm , 2011, SIAM J. Comput..

[45]  Robert A. Kowalski,et al.  Logic for problem solving , 1982, The computer science library : Artificial intelligence series.

[46]  Robert E. Tarjan,et al.  Finding Biconnected Components and Computing Tree Functions in Logarithmic Parallel Time (Extended Summary) , 1984, FOCS.

[47]  Yannis E. Ioannidis,et al.  On the Computation of the Transitive Closure of Relational Operators , 1986, VLDB.

[48]  Robert A. Kowalski,et al.  Predicate Logic as Programming Language , 1974, IFIP Congress.

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

[50]  Stephen A. Cook,et al.  An Observation on Time-Storage Trade Off , 1974, J. Comput. Syst. Sci..

[51]  Gary L. Miller,et al.  Parallel tree contraction and its application , 1985, 26th Annual Symposium on Foundations of Computer Science (sfcs 1985).

[52]  Jeffrey D. Ullman,et al.  Parallel Complexity of Logical Query Programs , 1986, FOCS.

[53]  Christos H. Papadimitriou,et al.  A note the expressive power of Prolog , 1985, Bull. EATCS.

[54]  Jeffrey Scott Vitter,et al.  New Classes for Parallel Complexity: A Study of Unification and Other Complete Problems for P , 1986, IEEE Transactions on Computers.

[55]  Jeffrey F. Naughton,et al.  Data independent recursion in deductive databases , 1985, J. Comput. Syst. Sci..

[56]  Stephen A. Cook,et al.  A Taxonomy of Problems with Fast Parallel Algorithms , 1985, Inf. Control..

[57]  Yehoshua Sagiv,et al.  Optimizing datalog programs , 1987, Foundations of Deductive Databases and Logic Programming..

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

[59]  Yehoshua Sagiv On computing restricted projections of representative instances , 1985, PODS '85.

[60]  Saharon Shelah,et al.  Fixed-Point Extensions of First-Order Logic , 1985, FOCS.

[61]  Jeffrey D. Ullman,et al.  Principles of Database Systems , 1980 .

[62]  Patrick Valduriez,et al.  Evaluation of Recursive Queries Using Join Indices , 1986, Expert Database Conf..

[63]  John C. Mitchell,et al.  On the Sequential Nature of Unification , 1984, J. Log. Program..

[64]  Leslie G. Valiant,et al.  Fast Parallel Computation of Polynomials Using Few Processors , 1983, SIAM J. Comput..

[65]  Uzi Vishkin,et al.  Randomized speed-ups in parallel computation , 2015, STOC '84.

[66]  Jeffrey D. Ullman,et al.  Introduction to Automata Theory, Languages and Computation , 1979 .

[67]  Jeffrey D. Ullman,et al.  Implementation of logical query languages for databases , 1985, TODS.

[68]  Vladimir Yu. Sazonov Polynomial Computability and Recursivity in Finite Domains , 1980, J. Inf. Process. Cybern..

[69]  Lawrence J. Henschen,et al.  On compiling queries in recursive first-order databases , 1984, JACM.

[70]  Ehud Y. Shapiro Alternation and the Computational Complexity of Logic Programs , 1984, J. Log. Program..

[71]  Haim Gaifman,et al.  A simple proof that connectivity of finite graphs is not first-order definable , 1985, Bull. EATCS.

[72]  Cynthia Dwork,et al.  Parallel Algorithms for Term Matching , 1986, CADE.

[73]  Steven Fortune,et al.  Parallelism in random access machines , 1978, STOC.

[74]  Yuri Gurevich,et al.  Algebras of feasible functions , 1983, 24th Annual Symposium on Foundations of Computer Science (sfcs 1983).

[75]  Christos H. Papadimitriou,et al.  The parallel complexity of simple chain queries , 1987, PODS '87.

[76]  Oded Shmueli,et al.  Decidability and expressiveness aspects of logic queries , 1987, XP7.52 Workshop on Database Theory.

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

[78]  Nicholas Pippenger,et al.  On simultaneous resource bounds , 1979, 20th Annual Symposium on Foundations of Computer Science (sfcs 1979).

[79]  D. Knuth,et al.  Simple Word Problems in Universal Algebras , 1983 .

[80]  Catriel Beeri,et al.  Bounds on the propagation of selection into logic programs , 1987, J. Comput. Syst. Sci..