Optimization in a logic based language for knowledge and data intensive applications

  • Ravi Krishnamurthy
  • Carlo Zaniolo
Databases And Logic
Part of the Lecture Notes in Computer Science book series (LNCS, volume 303)


This paper describes the optimization approach taken to ensure the safe and efficient execution of applications written in LDL, which is a declarative language based on Horn Clause Logic and intended for data intensive and knowledge based applications. In order to generalize the strategy successfully used in relational database systems we first characterize the optimization problem in terms of its execution space, cost functions and search algorithm. Then we extend this framework to deal with rules, complex terms, recursion and various problems resulting from the richer expressive power of Logic. Among these is the termination problem (safety), whereby an unsafe execution is treated as an extreme case of poor execution.


Horn Clause Query Optimization Conjunctive Query Relational Database System Recursive Predicate 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [AN 86]
    Ait-Kaci, H. and R. Nasr, “Residuation: a Paradigm for Integrating Logic and Functional Programming,” submitted for publication.Google Scholar
  2. [AU 79]
    Aho, A. and J. Ullman, Universality of Data Retrieval Languages, Proc. POPL Conf., San Antonio, TX, 1979.Google Scholar
  3. [BMSU85]
    Bancilhon, F., D, Maier, Y. Sagiv and Ullman, Magic Sets and other Strange Ways to Implements Logic Programs, Proc. 5-th ACM SIGMOD-SIGACT Symposium on Principles of Database Systems, pp. 1–16, 1986.Google Scholar
  4. [BR 86]
    Bancilhon, F., and R. Ramakrishan, An Amateur's Introduction to Recursive Query Processing Strategies, Proc. 1986 ACM-SIGMOD Intl. Conf. on Mgt. of Data, pp. 16–52, 1986.Google Scholar
  5. [BN 87]
    Beeri, C., S. Naqvi, R. Ramakrishnan, O. Shmueli, S. Tsur, Sets and Negation in a Logic Database Language, Proc. 6-th ACM SIGMOD-SIGACT Symposium on Principles of Database Systems, 1987.Google Scholar
  6. [Col 82]
    Colmemauer, A. et al., Prolog II: Reference Manual and Theoretical Model, Groupe d'Intelligence artificielle, Faculte de Sciences de Lumin, 1982.Google Scholar
  7. [GM 82]
    Grant, J. and Minker J., On Optimizing the Evaluation of a Set of Expressions, Int. Journal of Computer and Information Science, 11, 3 (1982), 179–189.Google Scholar
  8. [IW 87]
    Ioannidis, Y. E, Wong, E, Query Optimization by Simulated Annealing, Proc. 1987 ACM-SIGMOD Intl. Conf. on Mgt. oof Data, San Francisco, 1987.Google Scholar
  9. [Kw 79]
    Kowalski, R.A., “Algorithm = Logic + Control”, CACM, 22, 7, pp. 424–436, (1979).Google Scholar
  10. [KBZ 86]
    Krishnamurthy, R., Boral, H., Zaniolo, C. Optimization of Nonrecursive Queries, Proc. of 12th VLDB, Kyoto, Japan, 1986.Google Scholar
  11. [KRS 87]
    Krishnamurthy, R., R. Ramakrishnan. O. Shmueli, “A Framework for Testing Safety and Effective Computability”, MCC Report 1987 and also submitted for external publication.Google Scholar
  12. [KT 81]
    Kellog, C., and Travis, L. Reasoning with data in a deductively augmented database system, in Advances in Database Theory: Vol 1, H. Gallaire, J. Minker, and J. Nicholas eds., Plenum Press, New York, 1981, pp 261–298.Google Scholar
  13. [Llo 84]
    Lloyd, J. W., Foundations of Logic Programming, Springer-Verlag, 1984.Google Scholar
  14. [M 84]
    Maier, D., The Theory of Relational Databases, (pp. 553–542), Comp. Science Press, 1984.Google Scholar
  15. [MUV 86]
    K. Morris, J. D. Ullman and A. Van Gelder, Design Overview of the Nail! System, Proc. Third Int. Symposium on Logic Programming, pp. 127–139, 1986.Google Scholar
  16. [Nai 85]
    Naish, L., Negation and Control in Prolog, Ph. D. Thesis, Dept. of CS, Univ. of Melbourne, Austr., 1985.Google Scholar
  17. [NK 87]
    Naqvi Shamim and R. Krishnamurthy, Semantics of Updates in Logic Programming, Workshop on Database and Programming Languages, Roscoff, France 1987.Google Scholar
  18. [Per 82]
    Pereira Luis Moniz, Logic Control with Logic, UNL Report 2/82 (1982).Google Scholar
  19. [RBK 87]
    Ramakrishnan, R, C. Beeri, R. Krishnamurthy, Optimizing Existential Queries, MCC Technical Report, 1987, (also submitted for external publication).Google Scholar
  20. [Sel 79]
    Sellinger, P.G. et. al. Access Path Selection in a Relational Database Management System., Proc. 1979 ACM-SIGMOD Intl. Conf. on Mgt. of Data, pp. 23–34, 1979.Google Scholar
  21. [SG 85]
    Smith, D. E. and M. R. Genesereth, Ordering Conjunctive Queries, Artificial Intelligence 26, pp. 171–185, 1985.CrossRefGoogle Scholar
  22. [SZ 86]
    Sacca', D. and C. Zaniolo, The Generalized Counting Method for Recursive Logic Queries, Proc. ICDT '86 —Int. Conf. on Database Theory, Rome, Italy 1986.Google Scholar
  23. [TZ 86]
    Tsur, S. and C. Zaniolo, LDL: A Logic-Based Data Language, Proc. of 12th VLDB, Kyoto, Japan, 1986.Google Scholar
  24. [Ull 85]
    Ullman, J. D., Implementation of logical query languages for databases, TODS, 10, 3, (1985), 289–321.CrossRefGoogle Scholar
  25. [UV 85]
    Ullman, J.D. and A. Van Gelder, Testing Applicability of Top-Down Capture Rules, Stanford Univ. Report STAN-CS-85-146, 1985.Google Scholar
  26. [Vil 87]
    Villarreal, E., “Evaluation of an O(N**2) Method for Query Optimization”, MS Thesis, Dept. of Computer Science, Univ. of Texas at Austin, Austin, TX.Google Scholar
  27. [Za 85]
    Zaniolo, C. The representation and deductive retrieval of complex objects, Proc. of 11th VLDB, pp. 458–469, 1985.Google Scholar
  28. [Za 86]
    Zaniolo, C., Safety and Compilation of Non-Recursive Horn Clauses, Proc. First Int. Conf. on Expert Database Systems, Charleston, S.C., 1986.Google Scholar
  29. [ZS 87]
    Zaniolo C. and D. Sacca', “Rule Rewriting Methods for Efficient Implementations of Horn Logic,” MCC Technical Report 1987, submitted for publication.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1988

Authors and Affiliations

  • Ravi Krishnamurthy
    • 1
  • Carlo Zaniolo
    • 1
  1. 1.MCCAustin

Personalised recommendations