OLDTNF resolution is an important mechanism used in a Prolog interpreter. This mechanism is extended and improved for evaluating recursive queries in deductive databases. The key idea of the refinement is to distingui...OLDTNF resolution is an important mechanism used in a Prolog interpreter. This mechanism is extended and improved for evaluating recursive queries in deductive databases. The key idea of the refinement is to distinguish between two classes of lookup nodes in an OLDTNF derivation and to handle them differently. First, reduce the search space by cutting of any subtree rooted at a lookup node of the first class. Further, speed up the evaluation by processing the second class in a second phase and generate many solutions directly from the solutions already produced (and the corresponding keys of solution lists) instead of evaluating them by expanding the corresponding subtrees in terms of the new solutions stored in solution lists.展开更多
Grahne et al. have presented a graph algorithm for evaluating a subset of recursive queries. This method consists of two phases. In the first phase, the method transforms a linear binary-chain program into a set of eq...Grahne et al. have presented a graph algorithm for evaluating a subset of recursive queries. This method consists of two phases. In the first phase, the method transforms a linear binary-chain program into a set of equations over expressions containing predicate symbols. In the second phase, a graph is constructed from the equations and the answers are produced by traversing the relevant paths. A new algorithm is described which requires less time than Grahne’ s. The key idea of the improvement is to reduce the search space that will be traversed when a query is invoked. Further, the evaluation of cyclic data is speeded up by generating most answers directly in terms of the answers already found and the associated 'path information' instead of traversing the corresponding paths as usual. In this way, this algorithm achieves a linear time complexity for both acyclic and most of cyclic data.展开更多
This paper distinguishes among three kinds of linear recursions: canonical strongly linear recursion (CSLR), non-interdependent linear recursion (NILR) and interdependent linear recurstion (ILR) and presents an optima...This paper distinguishes among three kinds of linear recursions: canonical strongly linear recursion (CSLR), non-interdependent linear recursion (NILR) and interdependent linear recurstion (ILR) and presents an optimal algorithm for each. First, for the CSLRs, the magic-set method is refined in such a way that queries can be evaluated efficiently. Then, for the NILRS and ILRs, the concept of query dependency graphs is introduced to partition the rules of a program into a set of CSLRs and the computation is elaborated so that the oplimization for CSLRs can also be applied.展开更多
In this paper, an optimal method to handle cyclic and acyclic data relations in the linear recursive queries is proposed. High efficiency is achieved by integrating graph traversal mechanisms into a top-down evaluatio...In this paper, an optimal method to handle cyclic and acyclic data relations in the linear recursive queries is proposed. High efficiency is achieved by integrating graph traversal mechanisms into a top-down evaluation. In such a way the subsumption checks and the identification of cyclic data can be done very efficielltly First, based on the subsumption checks, the search space can be reduced drastically by avoiding any redundant expansion operation. In fact, in the case of non-cyclic data, the proposed algorithm requires only linear time for evaluating a linear recursive query. On the other hand, in the case of cyclic data, by using the technique for isolating strongly connected components a lot of answers can be generated directly in terms of the intermediate results and the relevant path information instead of evaluating them by performing algebraic operations. Since the cost of generating an answer is much less than that of evaluating an answer by algebraic operations, the time consumption for cyclic data can be reduced by an order of magnitude or more.展开更多
The counting method is a simple and efficient method for processing linear recursive datalog queries. Its time complexity is bounded by O(n.e), where n and e denote the numbers of nodes and edges, respectively, in the...The counting method is a simple and efficient method for processing linear recursive datalog queries. Its time complexity is bounded by O(n.e), where n and e denote the numbers of nodes and edges, respectively, in the graph representing the input relations. In this paper, the concepts of heritage appearance function and heritage selection function are introduced, and an evaluation algorithm based on the computation of such functions in topological order is developed. This new algorithm requires only linear time in the case of non-cyclic data.展开更多
In this paper, we propose a new arc consistency algorithm, AC-8,which requires less computation time and space than AC-6 and AC-7. The main ideaof the optimization is the divide-and-conquer strategy, thereby decomposi...In this paper, we propose a new arc consistency algorithm, AC-8,which requires less computation time and space than AC-6 and AC-7. The main ideaof the optimization is the divide-and-conquer strategy, thereby decomposing an arcconsistency problem into a series of smaller ones and trying to solve them in sequence.In this way, not only the space complexity but also the time complexity can be reduced. The reason for this is that due to the ahead of time performed inconsistencypropagation (in the sense that some of them are executed before the entire inconsis-tency checking has been finished), each constraint subnetwork will be searched with agradually shrunk domain. In addition, the technique of AC-6 can be integrated intoour algorithm, leading to a further decrease in computational complexity.展开更多
文摘OLDTNF resolution is an important mechanism used in a Prolog interpreter. This mechanism is extended and improved for evaluating recursive queries in deductive databases. The key idea of the refinement is to distinguish between two classes of lookup nodes in an OLDTNF derivation and to handle them differently. First, reduce the search space by cutting of any subtree rooted at a lookup node of the first class. Further, speed up the evaluation by processing the second class in a second phase and generate many solutions directly from the solutions already produced (and the corresponding keys of solution lists) instead of evaluating them by expanding the corresponding subtrees in terms of the new solutions stored in solution lists.
文摘Grahne et al. have presented a graph algorithm for evaluating a subset of recursive queries. This method consists of two phases. In the first phase, the method transforms a linear binary-chain program into a set of equations over expressions containing predicate symbols. In the second phase, a graph is constructed from the equations and the answers are produced by traversing the relevant paths. A new algorithm is described which requires less time than Grahne’ s. The key idea of the improvement is to reduce the search space that will be traversed when a query is invoked. Further, the evaluation of cyclic data is speeded up by generating most answers directly in terms of the answers already found and the associated 'path information' instead of traversing the corresponding paths as usual. In this way, this algorithm achieves a linear time complexity for both acyclic and most of cyclic data.
文摘This paper distinguishes among three kinds of linear recursions: canonical strongly linear recursion (CSLR), non-interdependent linear recursion (NILR) and interdependent linear recurstion (ILR) and presents an optimal algorithm for each. First, for the CSLRs, the magic-set method is refined in such a way that queries can be evaluated efficiently. Then, for the NILRS and ILRs, the concept of query dependency graphs is introduced to partition the rules of a program into a set of CSLRs and the computation is elaborated so that the oplimization for CSLRs can also be applied.
文摘In this paper, an optimal method to handle cyclic and acyclic data relations in the linear recursive queries is proposed. High efficiency is achieved by integrating graph traversal mechanisms into a top-down evaluation. In such a way the subsumption checks and the identification of cyclic data can be done very efficielltly First, based on the subsumption checks, the search space can be reduced drastically by avoiding any redundant expansion operation. In fact, in the case of non-cyclic data, the proposed algorithm requires only linear time for evaluating a linear recursive query. On the other hand, in the case of cyclic data, by using the technique for isolating strongly connected components a lot of answers can be generated directly in terms of the intermediate results and the relevant path information instead of evaluating them by performing algebraic operations. Since the cost of generating an answer is much less than that of evaluating an answer by algebraic operations, the time consumption for cyclic data can be reduced by an order of magnitude or more.
文摘The counting method is a simple and efficient method for processing linear recursive datalog queries. Its time complexity is bounded by O(n.e), where n and e denote the numbers of nodes and edges, respectively, in the graph representing the input relations. In this paper, the concepts of heritage appearance function and heritage selection function are introduced, and an evaluation algorithm based on the computation of such functions in topological order is developed. This new algorithm requires only linear time in the case of non-cyclic data.
文摘In this paper, we propose a new arc consistency algorithm, AC-8,which requires less computation time and space than AC-6 and AC-7. The main ideaof the optimization is the divide-and-conquer strategy, thereby decomposing an arcconsistency problem into a series of smaller ones and trying to solve them in sequence.In this way, not only the space complexity but also the time complexity can be reduced. The reason for this is that due to the ahead of time performed inconsistencypropagation (in the sense that some of them are executed before the entire inconsis-tency checking has been finished), each constraint subnetwork will be searched with agradually shrunk domain. In addition, the technique of AC-6 can be integrated intoour algorithm, leading to a further decrease in computational complexity.