Skip to main content

Abstract machine for \(\mathcal{L}\mathcal{D}\mathcal{L}\)

  • Session 4: Deductive Database Systems
  • Conference paper
  • First Online:
Advances in Database Technology — EDBT '90 (EDBT 1990)

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

Included in the following conference series:

Abstract

We propose an abstract machine for \(\mathcal{L}\mathcal{D}\mathcal{L}\) that maintains a high-level view of an \(\mathcal{L}\mathcal{D}\mathcal{L}\) program while incorporating aspects of its execution that make a performance difference. A canonical AND/OR graph corresponding to the \(\mathcal{L}\mathcal{D}\mathcal{L}\) program provides the skeleton of its execution. The nodes in the AND/OR graph are annotated to specify relevant details of the execution, such as access methods, join methods, execution strategies, intelligent backtracking etc. We formalize four execution methods (top-down, bottom-up as well as two hybrid methods that incorporate memoing) and two recursive computations (fixpoint and stack-based). The two computations and four execution methods are combined to cater to a rich variety of recursive techniques. This annotated AND/OR graph represents a declarative program for the abstract machine. The set of all possible annotated AND/OR graphs constitutes the execution space that defines the abstract machine.

To prove the feasibility of this declarative abstract machine, we demonstrate an actual realization by presenting a code generation algorithm that proceeds by translating each node in the annotated AND/OR graph into a sequence of imperative statements that include calls to a tuple-level interface of an underlying DBMS. The \(\mathcal{L}\mathcal{D}\mathcal{L}\) compiler — which supports Datalog, sets, updates, negation, non-deterministic choice and other advanced features — has been implemented using this approach.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bancilhon, F.D. “Naive Evaluation of Recursively Defined Relations,” in On Knowledge Base Management Systems, edited by M. Brodie and J. Mylopoulos, Springer-Verlag, 1985.

    Google Scholar 

  2. Bancilhon, F.D., D. Maier, Y. Sagiv, and J. Ullman. “Magic Sets and Other Strange Ways to Implement Logic Programs,” in Proc. SIGACT-SIGMOD Principles of Database Systems Conference (PODS), 1986.

    Google Scholar 

  3. Bancilhon, F.D. and R. Ramakrishnan. “An Amateur's Introduction to Recursive Query Processing Strategies,” in Proc. SIGACT-SIGMOD Int. Conf. on Management of Data (SIGMOD), Washington D.C., 1986.

    Google Scholar 

  4. Beeri, C. and R. Ramakrishnan. “On the Power of Magic,” in Proc. SIGACT-SIGMOD Principles of Database Systems Conference (PODS), 1987.

    Google Scholar 

  5. Byrd, L.. “Understanding the Control Flow of Prolog Programs,” in Proc. of the Logic Programming Workshop, 1980.

    Google Scholar 

  6. Henschen, L. and S. Naqvi “On Compiling Queries in Recursive First-Order Databases,” in J. ACM 31, 1(Jan. 1984), pp. 47–85.

    Article  Google Scholar 

  7. Krishnamurthy, R., and C. Zaniolo. “Optimization in a Logic Based Language for Knowledge and Data Intensive Applications,” Extending Data Base Technology, Venice, 1988.

    Google Scholar 

  8. Lloyd, J.W. Foundations of Logic Programming, Springer Verlag, 1984.

    Google Scholar 

  9. Mellish, C. “An Alternative to Structure Sharing in the Implementation of a Prolog Interpreter,” in Logic Programming, edited by K.L. Clark and S.A. Tärnlund, Academic Press, 1982.

    Google Scholar 

  10. Michie, D. “'Memo’ Functions and Machine Learning,” in Nature, April 1968.

    Google Scholar 

  11. Nilson, N.J. Principles of Artificial Intelligence, Tioga Publishing Company, 1980.

    Google Scholar 

  12. Naqvi, S. A. and S. Tsur. A Language for Data and Knowledge Bases, W.H. Freeman, 1989.

    Google Scholar 

  13. Pereira, L.M. and A. Porto. “Selective Backtracking,” in Logic Programming, edited by K.L. Clark and S.A. Tärnlund, Academic Press, 1982.

    Google Scholar 

  14. Ramakrishnan, R., C. Beeri, and R. Krishnamurthy. “Optimizing Existential Queries,” in Proc. SIGACT-SIGMOD Principles of Database Systems Conference (PODS), Austin, April 1988.

    Google Scholar 

  15. Sacca, D. and C. Zaniolo. “The Generalized Counting Method for Recursive Logic Queries,” in Proc. 1st Int. Conf. on Database Theory, Rome, 1986.

    Google Scholar 

  16. Ullman, J. “Implementation of Logical Query Languages for Databases,” in TODS, Vol. 10, No. 3, pp. 289–321, 1985.

    Google Scholar 

  17. Ullman, J. Database and Knowledge Systems, Vol. I, Computer Science Press, 1988.

    Google Scholar 

  18. Ullman, J. Database and Knowledge Systems, Vol. II, Computer Science Press, 1989.

    Google Scholar 

  19. Vieille, L. “Recursive Query Processing: The Power of Logic,” to appear in Theoretical Computer Science, 1989.

    Google Scholar 

  20. Wadsworth, C.P., “Semantics and Pragmatics of the Lambda-Calculus,” D. Phil. Thesis, University of Oxford, 1971.

    Google Scholar 

  21. Warren, D.H.D. “An Abstract Prolog Instruction Set,” Technical Note 309, SRI International, 1983

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

François Bancilhon Constantino Thanos Dennis Tsichritzis

Rights and permissions

Reprints and permissions

Copyright information

© 1990 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Chimenti, D., Gamboa, R., Krishnamurthy, R. (1990). Abstract machine for \(\mathcal{L}\mathcal{D}\mathcal{L}\) . In: Bancilhon, F., Thanos, C., Tsichritzis, D. (eds) Advances in Database Technology — EDBT '90. EDBT 1990. Lecture Notes in Computer Science, vol 416. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0022169

Download citation

  • DOI: https://doi.org/10.1007/BFb0022169

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-52291-1

  • Online ISBN: 978-3-540-46948-3

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics