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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Gelfond, M., Lifschitz, V.: Classical Negation in Logic Programs and Disjunctive Databases. New Generation Computing 9, 365–385 (1991)
Eiter, T., Gottlob, G., Mannila, H.: Disjunctive Datalog. ACM TODS 22, 364–418 (1997)
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)
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
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)
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)
Ullman, J.D.: Principles of Database and Knowledge Base Systems. Computer Science Press, Rockville (1989)
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)
Beeri, C., Ramakrishnan, R.: On the power of magic. JLP 10, 255–259 (1991)
Syuckey, P.J., Sudarshan, S.: Compiling query constraints. In: PODS 1994, pp. 56–67. ACM Press, New York (1994)
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)
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)
Greco, S.: Binding Propagation Techniques for the Optimization of Bound Disjunctive Queries. IEEE TKDE 15, 368–385 (2003)
Cadoli, M., Eiter, T., Gottlob, G.: Default Logic as a Query Language. IEEE TKDE 9, 448–463 (1997)
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)
Ramakrishnan, R., Sagiv, Y., Ullman, J.D., Vardi, M.Y.: Logical Query Optimization by Proof-Tree Transformation. JCSS 47, 222–248 (1993)
Gupta, A., Mumick, I.S.: Magic-sets Transformation in Nonrecursive Systems. In: PODS 1992, pp. 354–367 (1992)
Mumick, I.S., Finkelstein, S.J., Pirahesh, H., Ramakrishnan, R.: Magic is relevant. In: SIGMOD Conference 1990, pp. 247–258 (1990)
Behrend, A.: Soft stratification for magic set based query evaluation in deductive databases. In: PODS 2003, pp. 102–110. ACM Press, New York (2003)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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