Abstract
We propose a generalization of the well-known Magic Sets technique to DatalogĀ¬ programs with (possibly unstratified) negation under stable model semantics. Our technique produces a new program whose evaluation is generally more efficient (due to a smaller instantiation), while preserving soundness under cautious reasoning. Importantly, if the original program is consistent, then full query-equivalence is guaranteed for both brave and cautious reasoning, which turn out to be sound and complete.
In order to formally prove the correctness of our Magic Sets transformation, we introduce a novel notion of modularity for DatalogĀ¬ under the stable model semantics, which is relevant per se. We prove that a module can be evaluated independently from the rest of the program, while preserving soundness under cautious reasoning. For consistent programs, both soundness and completeness are guaranteed for brave reasoning and cautious reasoning as well. Our Magic Sets optimization constitutes an effective method for enhancing the performance of data-integration systems in which query-answering is carried out by means of cautious reasoning over DatalogĀ¬ programs. In fact, preliminary results of experiments in the EU project INFOMIX, show that Magic Sets are fundamental for the scalability of the system.
This work was supported by the European Commission under projects IST-2002-33570 INFOMIX, and IST-2001-37004 WASP.
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
Ullman, J.D.: Principles of Database and Knowledge Base Systems. Computer Science Press, Rockville (1989)
Gelfond, M., Lifschitz, V.: The Stable Model Semantics for Logic Programming. In: ICLP/SLP 1988, pp. 1070ā1080. MIT Press, Cambridge (1988)
Bidoit, N., Froidevaux, C.: Negation by Default and Unstratifiable Logic Programs. Theoretical Computer ScienceĀ 78, 85ā112 (1991)
Dantsin, E., Eiter, T., Gottlob, G., Voronkov, A.: Complexity and Expressive Power of Logic Programming. ACM Computing SurveysĀ 33, 374ā425 (2001)
Bidoit, N., Froidevaux, C.: General Logical Databases and Programs: Default Logic Semantics and Stratification. Information and ComputationĀ 91, 15ā54 (1991)
Marek, V.W., TruszczyÅski, M.: Autoepistemic Logic. JACMĀ 38, 588ā619 (1991)
Schlipf, J.: The Expressive Powers of Logic Programming Semantics. JCSSĀ 51, 64ā86 (1995); Abstract in Proc. PODS 1990, pp. 196ā204
Leone, N., Pfeifer, G., Faber, W., Eiter, T., Gottlob, G., Perri, S., Scarcello, F.: The DLV System for Knowledge Representation and Reasoning. In: ACM TOCL (2004) (to appear)
NiemelƤ, I., Simons, P., SyrjƤnen, T.: Smodels: A System for Answer Set Programming. In: NMR 2000 (2000)
Arenas, M., Bertossi, L.E., Chomicki, J.: Specifying and querying database repairs using logic programs with exceptions. In: Proc. of FQASĀ 2000, pp. 27ā41. Springer, Heidelberg (2000)
Greco, G., Greco, S., Zumpano, E.: A logic programming approach to the integration, repairing and querying of inconsistent databases. In: Codognet, P. (ed.) ICLP 2001. LNCS, vol.Ā 2237, pp. 348ā364. Springer, Heidelberg (2001)
BarcelĆ³, P., Bertossi, L.: Repairing databases with annotated predicate logic. In: Proc. the 10th Int. Workshop on Non-Monotonic Reasoning (NMR 2002), pp. 160ā170 (2002)
CalƬ, A., Lembo, D., Rosati, R.: Query rewriting and answering under constraints in data integration systems. In: Proc. of IJCAI 2003, pp. 16ā21 (2003)
Bravo, L., Bertossi, L.: Logic programming for consistently querying data integration systems. In: Proc. of IJCAI 2003, pp. 10ā15 (2003)
Chomicki, J., Marcinkowski, J.: Minimal-Change Integrity Maintenance Using Tuple Deletions. Information and Computation (2004) (to appear)
Lifschitz, V., Turner, H.: Splitting a Logic Program. In: Van Hentenryck, P. (ed.) ICLP 1994, pp. 23ā37. MIT Press, Cambridge (1994)
Eiter, T., Gottlob, G., Mannila, H.: Disjunctive Datalog. ACM TODSĀ 22, 364ā418 (1997)
Dung, P.M.: On the Relations between Stable and Well-Founded Semantics of Logic Programs. Theoretical Computer ScienceĀ 105, 7ā25 (1992)
Beeri, C., Ramakrishnan, R.: On the power of magic. JLPĀ 10, 255ā259 (1991)
CalƬ, A., Calvanese, D., De Giacomo, G., Lenzerini, M.: Data integration under integrity constraints. Information SystemsĀ 29, 147ā163 (2004)
CalƬ, A., Lembo, D., Rosati, R.: On the decidability and complexity of query answering over inconsistent and incomplete databases. In: PODS 2003, pp. 260ā271 (2003)
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)
Mumick, I.S., Finkelstein, S.J., Pirahesh, H., Ramakrishnan, R.: Magic is relevant. In: SIGMOD Conference 1990, pp. 247ā258 (1990)
Stuckey, P.J., Sudarshan, S.: Compiling query constraints. In: PODS 1994, pp. 56ā67. ACM Press, New York (1994)
Ross, K.A.: Modular Stratification and Magic Sets for Datalog Programs with Negation. JACMĀ 41, 1216ā1266 (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)
Behrend, A.: Soft stratification for magic set based query evaluation in deductive databases. In: PODS 2003, pp. 102ā110. ACM Press, New York (2003)
Greco, S.: Binding Propagation Techniques for the Optimization of Bound Disjunctive Queries. IEEE TKDEĀ 15, 368ā385 (2003)
Cumbo, C., Faber, W., Greco, G.: Enhancing the magic-set method for disjunctive datalog programs. In: Proc. of ICLP 2004, Saint-Malo, France (2004) (forthcoming)
Greco, G., Greco, S., Trubitsyna, I., Zumpano, E.: Optimization of Bound Disjunctive Queries with Constraints. TPLP (to appear (CoRR report cs.LO/0406013))
Eiter, T., Fink, M., Greco, G., Lembo, D.: Efficient evaluation of logic programs for querying data integration systems. In: Palamidessi, C. (ed.) ICLP 2003. LNCS, vol.Ā 2916, pp. 163ā177. Springer, Heidelberg (2003)
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
Faber, W., Greco, G., Leone, N. (2004). Magic Sets and Their Application to Data Integration. In: Eiter, T., Libkin, L. (eds) Database Theory - ICDT 2005. ICDT 2005. Lecture Notes in Computer Science, vol 3363. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30570-5_21
Download citation
DOI: https://doi.org/10.1007/978-3-540-30570-5_21
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-24288-8
Online ISBN: 978-3-540-30570-5
eBook Packages: Computer ScienceComputer Science (R0)