Skip to main content

Enhancing the Magic-Set Method for Disjunctive Datalog Programs

  • Conference paper
Logic Programming (ICLP 2004)

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

Included in the following conference series:

Abstract

We present a new technique for the optimization of (partially) bound queries over disjunctive datalog programs. The technique exploits the propagation of query bindings, and extends the Magic-Set optimization technique (originally defined for non-disjunctive programs) to the disjunctive case, substantially improving on previously defined approaches.

Magic-Set-transformed disjunctive programs frequently contain redundant rules. We tackle this problem and propose a method for preventing the generation of such superfluous rules during the Magic-Set transformation. In addition, we provide an efficient heuristic method for the identification of redundant rules, which can be applied in general, even if Magic-Sets are not used.

We implement all proposed methods in the DLV system – the state-of-the-art implementation of disjunctive datalog – and perform some experiments. The experimental results confirm the usefulness of Magic-Sets for disjunctive datalog, and they highlight the computational gain obtained by our method, which outperforms significantly the previously proposed Magic-Set method for disjunctive datalog programs.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Gelfond, M., Lifschitz, V.: Classical Negation in Logic Programs and Disjunctive Databases. New Generation Computing 9, 365–385 (1991)

    Article  Google Scholar 

  2. Eiter, T., Gottlob, G., Mannila, H.: Disjunctive Datalog. ACM TODS 22, 364–418 (1997)

    Article  Google Scholar 

  3. Eiter, T., Faber, W., Leone, N., Pfeifer, G.: Declarative Problem-Solving Using the DLV System. In: Minker, J. (ed.) Logic-Based Artificial Intelligence, pp. 79–103. Kluwer, Dordrecht (2000)

    Google Scholar 

  4. Leone, N., Pfeifer, G., Faber, W., Eiter, T., Gottlob, G., Perri, S., Scarcello, F.: The DLV System for Knowledge Representation and Reasoning (2004) (to appear), Available via http://www.arxiv.org/ps/cs.AI/0211004

  5. Janhunen, T., Niemelä, I., Simons, P., You, J.H.: Partiality and Disjunctions in Stable Model Semantics. In: KR 2000, April 12-15, 2000, pp. 411–419. Morgan Kaufmann, San Francisco (2000)

    Google Scholar 

  6. Arieli, O., Denecker, M., Van Nuffelen, B., Bruynooghe, M.: Database repair by signed formulae. In: Seipel, D., Turull-Torres, J.M.a. (eds.) FoIKS 2004. LNCS, vol. 2942, pp. 14–30. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  7. Ullman, J.D.: Principles of Database and Knowledge Base Systems. Computer Science Press, Rockville (1989)

    Google Scholar 

  8. Bancilhon, F., Maier, D., Sagiv, Y., Ullman, J.D.: Magic Sets and Other Strange Ways to Implement Logic Programs. In: PODS 1986, pp. 1–16 (1986)

    Google Scholar 

  9. Beeri, C., Ramakrishnan, R.: On the power of magic. JLP 10, 255–259 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  10. Syuckey, P.J., Sudarshan, S.: Compiling query constraints. In: PODS 1994, pp. 56–67. ACM Press, New York (1994)

    Google Scholar 

  11. Kemp, D.B., Srivastava, D., Stuckey, P.J.: Bottom-up evaluation and query optimization of well-founded models. Theoretical Computer Science 146, 145–184 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  12. Seshadri, P., Hellerstein, J.M., Pirahesh, H., Leung, T.Y.C., Ramakrishnan, R., Srivastava, D., Stuckey, P.J., Sudarshan, S.: Cost-based optimization for magic: Algebra and implementation. In: SIGMOD Conference 1996, pp. 435–446. ACM Press, New York (1996)

    Chapter  Google Scholar 

  13. Greco, S.: Binding Propagation Techniques for the Optimization of Bound Disjunctive Queries. IEEE TKDE 15, 368–385 (2003)

    Google Scholar 

  14. Cadoli, M., Eiter, T., Gottlob, G.: Default Logic as a Query Language. IEEE TKDE 9, 448–463 (1997)

    Google Scholar 

  15. Greco, S., Saccà, D., Zaniolo, C.: The PushDownMethod to Optimize Chain Logic Programs (Extended Abstract). In: Fülöp, Z., Gecseg, F. (eds.) ICALP 1995. LNCS, vol. 944, pp. 523–534. Springer, Heidelberg (1995)

    Google Scholar 

  16. Ramakrishnan, R., Sagiv, Y., Ullman, J.D., Vardi, M.Y.: Logical Query Optimization by Proof-Tree Transformation. JCSS 47, 222–248 (1993)

    MATH  MathSciNet  Google Scholar 

  17. Gupta, A., Mumick, I.S.: Magic-sets Transformation in Nonrecursive Systems. In: PODS 1992, pp. 354–367 (1992)

    Google Scholar 

  18. Mumick, I.S., Finkelstein, S.J., Pirahesh, H., Ramakrishnan, R.: Magic is relevant. In: SIGMOD Conference 1990, pp. 247–258 (1990)

    Google Scholar 

  19. Behrend, A.: Soft stratification for magic set based query evaluation in deductive databases. In: PODS 2003, pp. 102–110. ACM Press, New York (2003)

    Chapter  Google Scholar 

  20. Baumgartner, P., Furbach, U., Niemelä, I.: Hyper Tableaux. In: Orłowska, E., Alferes, J.J., Moniz Pereira, L. (eds.) JELIA 1996. LNCS, vol. 1126, pp. 1–17. Springer, Heidelberg (1996)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Cumbo, C., Faber, W., Greco, G., Leone, N. (2004). Enhancing the Magic-Set Method for Disjunctive Datalog Programs. In: Demoen, B., Lifschitz, V. (eds) Logic Programming. ICLP 2004. Lecture Notes in Computer Science, vol 3132. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-27775-0_26

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-27775-0_26

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-22671-0

  • Online ISBN: 978-3-540-27775-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics