Skip to main content

The generalized counting method for recursive logic queries

Invited Lectures

Part of the Lecture Notes in Computer Science book series (LNCS,volume 243)

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.

Keywords

  • Function Symbol
  • Relational Algebra
  • Predicate Symbol
  • Horn Clause
  • Counting Rule

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Part of this work was done while this author was visiting at MCC.

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/3-540-17187-8_28
  • Chapter length: 23 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
eBook
USD   89.00
Price excludes VAT (USA)
  • ISBN: 978-3-540-47346-6
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   119.00
Price excludes VAT (USA)

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aho A. V. and J. Ullman, “ Universality of Data Retrieval Languages,” Proc. POPL Conference, San Antonio Tx, 1979.

    Google Scholar 

  2. Aiello, L. and Cecchi, “Adding a Closure Operator to the Extended Relational Algebra ...”, Rome Univ. Technical Report, 1985.

    Google Scholar 

  3. Bancilhon, F., “Naive Evaluation of Recursively defined Relations”, Unpublished Manuscript, 1985.

    Google Scholar 

  4. 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.

    Google Scholar 

  5. 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.

    Google Scholar 

  6. Bancilhon, F., D. Maier, Y. Sagiv, J. Ullman, “Magic sets: algorithms and examples”, unpublished manuscript, 1985.

    Google Scholar 

  7. 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.

    Google Scholar 

  8. 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.

    Google Scholar 

  9. 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.

    Google Scholar 

  10. Henschen, L.J., Naqvi, S. A., “On compiling queries in recursive first-order databases”, JACM 31, 1, 1984, pp. 47–85.

    Google Scholar 

  11. Lozinskii, E.L., “Inference by generating and structuring of deductive databases”, Report 84-11, Dept. of Computer Science, Hebrew University, Israel.

    Google Scholar 

  12. McKay, D., Shapiro, S., “Using active connection graphs for reasoning with recursive rules”, Proc. 7th IJCAI, 1981, pp. 368–374.

    Google Scholar 

  13. Parker, S. et al., “Logic Programming and Databases,” in Expert Database Systems, L. Kerschberg (ed.), Benjamin/Cummings, 1986.

    Google Scholar 

  14. Reiter, R., “On closed world databases”, in Logic and Databases (Gallaire, H., Minker, J., eds), Plenum, New York, 1978, pp. 55–76.

    Google Scholar 

  15. 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.

    Google Scholar 

  16. Saccà, D., Zaniolo, C., “Implementation of recursive queries for a data language based on pure Horn clauses”, unpublished manuscript, 1986.

    Google Scholar 

  17. Saccà, D., Zaniolo, C., “Techniques for Solving Recursive queries in a Logic Based Language,” in preparation.

    Google Scholar 

  18. Ullman, J.D., Principles of Database Systems, Computer Science Press, Rockville, Md., 1982.

    Google Scholar 

  19. Tarski, A. “A Lattice Theoretical Fixpoint Theorem and its Application,” Pacific Journal of Mathematics No. 5, pp. 285–309, 1955.

    Google Scholar 

  20. Ullman, J.D. and A. Van Gelder, “Testing Applicability of Top-Down Capture Rules,” Stanford University, Report STAN-CS-85-1046, 1985.

    Google Scholar 

  21. Ullman, J.D., “Implementation of logical query languages for databases”, TODS 10, 3, 1985, pp. 289–321.

    Google Scholar 

  22. van Emden, M.H., Kowalski, R., “The semantics of predicate logic as a programming language”, JACM 23, 4, 1976, pp. 733–742.

    Google Scholar 

  23. 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.

    Google Scholar 

  24. Vieille, L. “Recursive Axioms in Deductive Databases: the Query-Subquery Approach,” Proc. First Int. Conference on Expert Database Systems, Charleston, S.C., 1986.

    Google Scholar 

  25. Zaniolo, C. “Prolog: a database query language for all seasons,” in Expert Database Systems, L. Kerschberg (ed.), Benjamin/Cummings, 1986.

    Google Scholar 

  26. Zaniolo, C. “The Representation and Deductive Retrieval of Complex Objects,” Proc. 11-th VLDB, pp. 459–469, 1985.

    Google Scholar 

  27. Zaniolo, C. “Safety and Compilation of Non-Recursive Horn Clauses,” Proc. First Int. Conference on Expert Database Systems, Charleston, S.C., 1986.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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