Abstract
This paper treats the problem of implementing efficiently recursive Horn Clauses queries, including those with function symbols. In particular, the situation is studied where the initial bindings of the arguments in the recursive query goal can be used in the top-down (as in backward chaining) execution phase to improve the efficiency and, often, to guarantee the termination, of the forward chaining execution phase that implements the fixpoint computation for the recursive query. A general method is given for solving these queries; the method performs an analysis of the binding passing behavior of the query, and then reschedules the overall execution as two fixpoint computations derived as results of this analysis. The first such computation emulates the propagation of bindings in the top-down phase; the second generates the desired answer by proving the goals left unsolved during the previous step. Finally, sufficient conditions for safety are derived, to ensure that the fixpoint computations are completed in a finite number of steps.
Part of this work was done while this author was visiting at MCC.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
Aho A. V. and J. Ullman, “ Universality of Data Retrieval Languages,” Proc. POPL Conference, San Antonio Tx, 1979.
Aiello, L. and Cecchi, “Adding a Closure Operator to the Extended Relational Algebra ...”, Rome Univ. Technical Report, 1985.
Bancilhon, F., “Naive Evaluation of Recursively defined Relations”, Unpublished Manuscript, 1985.
Bayer, R., U. Guntzer and W. Kiessling, “On the Evaluation of Recursion in Deductive DB Systems by Efficient Differential Fixpoint Iteration,” Technical Report, Technische Univ. Munich, 1985.
Bancilhon, F., D. Maier, Y. Sagiv, J. Ullman, “Magic sets and other strange ways to implement logic programs”, Proc. 5th ACM SIGMODSIGACT Symp. on Principles of Database Systems, 1986.
Bancilhon, F., D. Maier, Y. Sagiv, J. Ullman, “Magic sets: algorithms and examples”, unpublished manuscript, 1985.
Bancilhon, F., Ramakrishan, R., “An amateur's introduction to recursive query processing strategies”, Proc. ACM SIGMOD Int. Conference on Management of Data, Washington, D.C., May 1986.
Chandra, A.K., Harel, D., “Horn clauses and the fixpoint hierarchy”, Proc. ACM SIGMOD-SIGACT Symp. on Principles of Database Systems, 1982, pp. 158–163.
Gardarin, G., DeMaindreville, C., “ Evaluation of Database Recursive Logic Programs as Recursive Function Series,” Proc. ACM SIGMOD Int. Conference on Management of Data, Washington, D.C., May 1986.
Henschen, L.J., Naqvi, S. A., “On compiling queries in recursive first-order databases”, JACM 31, 1, 1984, pp. 47–85.
Lozinskii, E.L., “Inference by generating and structuring of deductive databases”, Report 84-11, Dept. of Computer Science, Hebrew University, Israel.
McKay, D., Shapiro, S., “Using active connection graphs for reasoning with recursive rules”, Proc. 7th IJCAI, 1981, pp. 368–374.
Parker, S. et al., “Logic Programming and Databases,” in Expert Database Systems, L. Kerschberg (ed.), Benjamin/Cummings, 1986.
Reiter, R., “On closed world databases”, in Logic and Databases (Gallaire, H., Minker, J., eds), Plenum, New York, 1978, pp. 55–76.
Saccà, D., Zaniolo, C., “On the implementation of a simple class of logic queries for databases”, Proc. 5th ACM SIGMOD-SIGACT Symp. on Principles of Database Systems, 1986.
Saccà, D., Zaniolo, C., “Implementation of recursive queries for a data language based on pure Horn clauses”, unpublished manuscript, 1986.
Saccà, D., Zaniolo, C., “Techniques for Solving Recursive queries in a Logic Based Language,” in preparation.
Ullman, J.D., Principles of Database Systems, Computer Science Press, Rockville, Md., 1982.
Tarski, A. “A Lattice Theoretical Fixpoint Theorem and its Application,” Pacific Journal of Mathematics No. 5, pp. 285–309, 1955.
Ullman, J.D. and A. Van Gelder, “Testing Applicability of Top-Down Capture Rules,” Stanford University, Report STAN-CS-85-1046, 1985.
Ullman, J.D., “Implementation of logical query languages for databases”, TODS 10, 3, 1985, pp. 289–321.
van Emden, M.H., Kowalski, R., “The semantics of predicate logic as a programming language”, JACM 23, 4, 1976, pp. 733–742.
Van Gelder, A., “A Message Passing Framework for Logical Query Evaluation,” Proc. ACM SIGOD Int. Conference on Management of Data, Washington, D.C., May 1986.
Vieille, L. “Recursive Axioms in Deductive Databases: the Query-Subquery Approach,” Proc. First Int. Conference on Expert Database Systems, Charleston, S.C., 1986.
Zaniolo, C. “Prolog: a database query language for all seasons,” in Expert Database Systems, L. Kerschberg (ed.), Benjamin/Cummings, 1986.
Zaniolo, C. “The Representation and Deductive Retrieval of Complex Objects,” Proc. 11-th VLDB, pp. 459–469, 1985.
Zaniolo, C. “Safety and Compilation of Non-Recursive Horn Clauses,” Proc. First Int. Conference on Expert Database Systems, Charleston, S.C., 1986.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1986 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Saccà, D., Zaniolo, C. (1986). The generalized counting method for recursive logic queries. In: Ausiello, G., Atzeni, P. (eds) ICDT '86. ICDT 1986. Lecture Notes in Computer Science, vol 243. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-17187-8_28
Download citation
DOI: https://doi.org/10.1007/3-540-17187-8_28
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-17187-4
Online ISBN: 978-3-540-47346-6
eBook Packages: Springer Book Archive