Towards an algebraic theory of recursion

An algebraic framework for the study of recursion has been developed. For immediate linear recursion, a Horn clause is represented by a relational algebra operator. It is shown that the set of all such operators forms a closed semiring. In this formalism, query answering corresponds to solving a linear equation. For the first time, the query answer is able to be expressed in an explicit algebraic form within an algebraic structure. The manipulative power thus afforded has several implications on the implementation of recursive query processing algorithms. Several possible decompositions of a given operator are presented that improve the performance of the algorithms, as well as several transformations that give the ability to take into account any selections or projections that are present in a givin query. In addition, it is shown that mutual linear recursion can also be studied within a closed semiring, by using relation vectors and operator matrices. Regarding nonlinear recursion, it is first shown that Horn clauses always give rise to multilinear recursion, which can always be reduced to bilinear recursion. Bilinear recursion is then shown to form a nonassociative closed semiring. Finally, several sufficient and necessary-and-sufficient conditions for bilinear recursion to be equivalent to a linear one of a specific form are given. One of the sufficient conditions is derived by embedding to bilinear recursion in an algebra.

[1]  Catriel Beeri,et al.  On the power of magic , 1987, J. Log. Program..

[2]  Jeffrey F. Naughton,et al.  Compiling separable recursions , 1988, SIGMOD '88.

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

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

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

[6]  Georges Gardarin,et al.  Evaluation of database recursive logic programs as recurrent function series , 1986, SIGMOD '86.

[7]  Eugene Wong,et al.  An Algebraic Approach to Recursive Inference , 1986, Expert Database Conf..

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

[9]  Umeshwar Dayal,et al.  Traversal recursion: a practical approach to supporting recursive applications , 1986, SIGMOD '86.

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

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

[12]  Jeffrey D. Ullman,et al.  Proof-tree transformation theorems and their applications , 1989, PODS.

[13]  Yannis E. Ioannidis Commutativity and its Role in the Processing of Linear Recursion , 1992, J. Log. Program..

[14]  Carlo Zaniolo,et al.  The Generalized Counting Method for Recursive Logic Queries , 1986, Theor. Comput. Sci..

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

[16]  Georg Gottlob,et al.  Translation and Optimization of Logic Queries: The Algebraic Approach , 1986, VLDB.

[17]  Georges Gardarin,et al.  Magic Functions: A Technique to Optimize Extended Datalog Recursive Programs , 1987, VLDB.

[18]  Hongjun Lu,et al.  Some performance results on recursive query processing in relational database systems , 1986, 1986 IEEE Second International Conference on Data Engineering.

[19]  Mihalis Yannakakis,et al.  Equivalences Among Relational Expressions with the Union and Difference Operators , 1980, J. ACM.

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

[21]  Daniel J. Lehmann,et al.  Algebraic Structures for Transitive Closure , 1976, Theor. Comput. Sci..

[22]  Letizia Tanca,et al.  Optimization of Systems of Algebraic Equations for Evaluating Datalog Queries , 1987, VLDB.

[23]  Raghu Ramakrishnan,et al.  Performance Evaluation of Data Intensive Logic Programs , 1988, Foundations of Deductive Databases and Logic Programming..

[24]  Haim Gaifman,et al.  Semantics of Logic Programs , 1990, ICLP.

[25]  Stuart C. Shapiro,et al.  Inference with Recursive Rules , 1980, AAAI.

[26]  Catriel Beeri,et al.  Optimizing existential datalog queries , 1988, PODS.

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

[28]  Patrick Valduriez,et al.  Transitive Closure of Transitively Closed Relations , 1988, Expert Database Conf..

[29]  Laurent Vieille,et al.  Recursive Axioms in Deductive Databases: The Query/Subquery Approach , 1986, Expert Database Conf..

[30]  Jeffrey F. Naughton Data Independent Recursion in Deductive Databases , 1989, J. Comput. Syst. Sci..

[31]  I. Anderson,et al.  Graphs and Networks , 1981, The Mathematical Gazette.

[32]  Ashok K. Chandra,et al.  Optimal implementation of conjunctive queries in relational data bases , 1977, STOC '77.

[33]  Premkumar T. Devanbu,et al.  Moving Selections into Linear Least Fixpoint Queries , 1989, IEEE Trans. Knowl. Data Eng..

[34]  I. Herstein,et al.  Topics in algebra , 1964 .

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

[36]  R. Backhouse,et al.  Regular Algebra Applied to Path-finding Problems , 1975 .

[37]  Thomas Sudkamp,et al.  Languages and Machines , 1988 .

[38]  Jeffrey F. Naughton,et al.  Minimizing function-free recursive inference rules , 1989, JACM.

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

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

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

[42]  Michael J. Maher,et al.  Closures and Fairness in the Semantics of Programming Logic , 1984, Theor. Comput. Sci..

[43]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

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

[45]  François Bancilhon,et al.  Naive Evaluation of Recursively Defined Relations , 1986, On Knowledge Base Management Systems.

[46]  Clement T. Yu,et al.  Necessary and sufficient conditions to linearize doubly recursive programs in logic databases , 1990, TODS.

[47]  Jeffrey F. Naughton,et al.  Argument Reduction by Factoring , 1989, VLDB.

[48]  Eugene Wong,et al.  Query optimization by simulated annealing , 1987, SIGMOD '87.

[49]  Clement T. Yu,et al.  A necessary condition for a doubly recursive rule to be equivalent to a linear recursive rule , 1987, SIGMOD '87.

[50]  Yatin P. Saraiya Linearising nonlinear recursions in polynomial time , 1989, PODS.

[51]  Harry G. Mairson,et al.  Undecidable optimization problems for database logic programs , 1993, JACM.

[52]  R. D. Schafer An Introduction to Nonassociative Algebras , 1966 .

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

[54]  Michael Kifer,et al.  On compile-time query optimization in deductive databases by means of static filtering , 1990, TODS.

[55]  A. Tarski A LATTICE-THEORETICAL FIXPOINT THEOREM AND ITS APPLICATIONS , 1955 .