Magic Sets for the Bottom-Up Evaluation of Finitely Recursive Programs
The support for function symbols in logic programming under answer set semantics allows to overcome some modeling limitations of traditional Answer Set Programming (ASP) systems, such as the inability of handling infinite domains. On the other hand, admitting function symbols in ASP makes inference undecidable in the general case. Lately, the research community is focusing on finding proper subclasses for which decidability of inference is guaranteed. The two major proposals, so far, are finitary programs and finitely-ground programs. These two proposals are somehow complementary: indeed, the former is conceived to allow decidable querying (by means of a top-down evaluation strategy), while the latter supports the computability of answer-sets (by means of a bottom-up evaluation strategy). One of the main advantages of finitely-ground programs is that they can be ”directly” evaluated by current ASP systems, which are based on a bottom-up computational model. However, there are also some interesting programs which are suitable for top-down query evaluation; but do not fall in the class of finitely-ground programs.
In this paper, we focus on disjunctive finitely-recursive positive (DFRP) programs. We present a proper adaptation of the magic-sets technique for DFRP programs, which ensures query equivalence under both brave and cautious reasoning. We show that, if the input program is DFRP, then its magic-set rewriting is guaranteed to be finitely ground. Thus, reasoning on DFRP programs turns out to be decidable, and we provide an effective method for its computation on the ASP system DLV.
KeywordsLogic Program Ground Atom Disjunctive Rule Disjunctive Logic Program Magic Version
Unable to display preview. Download preview PDF.
- 1.Baral, C.: Knowledge Representation, Reasoning and Declarative Problem Solving. CUP (2003)Google Scholar
- 2.Gelfond, M., Lifschitz, V.: The Stable Model Semantics for Logic Programming. In: ICLP/SLP 1988, pp. 1070–1080. MIT Press, Cambridge (1988)Google Scholar
- 4.Lifschitz, V.: Answer Set Planning. In: ICLP 1999, pp. 23–37 (1999)Google Scholar
- 5.Marek, V.W., Truszczyński, M.: Stable Models and an Alternative Logic Programming Paradigm. In: The Logic Programming Paradigm – A 25-Year Perspective, pp. 375–398 (1999)Google Scholar
- 6.Syrjänen, T.: Omega-restricted logic programs. In: Eiter, T., Faber, W., Truszczyński, M. (eds.) LPNMR 2001. LNCS (LNAI), vol. 2173, p. 267. Springer, Heidelberg (2001)Google Scholar
- 10.Lin, F., Wang, Y.: Answer Set Programming with Functions. In: KR 2008, Sydney, Australia, pp. 454–465. AAAI Press, Menlo Park (2008)Google Scholar
- 13.Baselice, S., Bonatti, P.A., Criscuolo, G.: On Finitely Recursive Programs. Tech. Report 0901.2850v1, arXiv.org (2009); To appear in TPLP (TPLP)Google Scholar
- 16.Calimeri, F., Cozza, S., Ianni, G., Leone, N.: DLV-Complex, homepage (since 2008), http://www.mat.unical.it/dlv-complex
- 17.Marano, M., Ianni, G., Ricca, F.: A Magic Set Implementation for Disjunctive Logic Programming with Function Symbols. Submitted to CILC 2009 (2009)Google Scholar
- 18.Bancilhon, F., Maier, D., Sagiv, Y., Ullman, J.D.: Magic Sets and Other Strange Ways to Implement Logic Programs. In: PODS 1986, Cambridge, Massachusetts, pp. 1–15 (1986)Google Scholar
- 19.Ullman, J.D.: Principles of Database and Knowledge Base Systems, vol. 2. Computer Science Press (1989)Google Scholar
- 20.Beeri, C., Ramakrishnan, R.: On the Power of Magic. In: PODS 1987, pp. 269–284. ACM, New York (1987)Google Scholar
- 23.Lifschitz, V., Turner, H.: Splitting a Logic Program. In: ICLP 1994, pp. 23–37. MIT Press, Cambridge (1994)Google Scholar
- 24.Naqvi, S., Tsur, S.: A logical language for data and knowledge bases. CS Press, NY (1989)Google Scholar
- 28.Behrend, A.: Soft stratification for magic set based query evaluation in deductive databases. In: PODS 2003, San Diego, CA, USA, pp. 102–110 (2003)Google Scholar