Optimization of Linear Logic Programs Using Counting Methods

We present a general solution to the problem of optimized execution of logic programs containing linear recursive rules. Our solution is based on extensions of the classical counting method, which is known to be efficient but of limited applicability. In fact, the range of applicability of the counting method, and its variants proposed by previous researchers, suffer from one or more of the following limitations: the method can be applied only when (1) the adorned program contains one recursive rule, (2) the ‘left part’ and the ‘right part’ of the recursive rule do not have any common variable and (3) the relation associated with the left part of the recursive rule is ‘acyclic’. In this paper, a simple and unified framework is presented, where those limitations are removed, and the counting method thus become applicable to all programs with linear rules. This framework also allows a simple treatment of programs factorizable into segments, which can be computed separately yielding a much faster execution. A simple factorization technique based on argument reduction is presented that produces optimizations similar to those defined in the literature for RLC-linear programs (i.e., programs with right- linear rules, left-linear rules and a combination of the two).

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

[2]  Z. Meral Özsoyoglu,et al.  Synchronized counting method , 1989, [1989] Proceedings. Fifth International Conference on Data Engineering.

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

[4]  Catriel Beeri,et al.  Sets and negation in a logic data base language (LDL1) , 1987, PODS.

[5]  Carlo Zaniolo,et al.  Design and Implementation of a Logic Based Language for Data Intensive Applications , 1988, ICLP/SLP.

[6]  Catriel Beeri,et al.  On the power of magic , 1987, PODS '87.

[7]  Jeffrey F. Naughton,et al.  A Counting Algorithm for a Cyclic Binary Query , 1991, J. Comput. Syst. Sci..

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

[9]  Jeffrey F. Naughton,et al.  Efficient evaluation of right-, left-, and multi-linear rules , 1989, SIGMOD '89.

[10]  Shamim A. Naqvi,et al.  A Logical Language for Data and Knowledge Bases , 1989 .

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

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

[13]  Robert E. Tarjan,et al.  Depth-First Search and Linear Graph Algorithms , 1972, SIAM J. Comput..

[14]  Carlo Zaniolo,et al.  The LDL System Prototype , 1990, IEEE Trans. Knowl. Data Eng..

[15]  Domenico Saccà,et al.  Comparison of Methods for Logic-Query Implementation , 1991, J. Log. Program..

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

[17]  Carlo Zaniolo,et al.  Magic counting methods , 1987, SIGMOD '87.

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

[19]  Jack Minker Foundations of deductive databases and logic programming , 1988 .

[20]  Carlo Zaniolo Object Identity and Inheritance in Deductive Databases - an Evolutionary Approach , 1989, DOOD.