International Workshop on Rules and Rule Markup Languages for the Semantic Web

RuleML 2014: Rules on the Web. From Theory to Applications pp 97-111 | Cite as

Checking Termination of Logic Programs with Function Symbols through Linear Constraints

  • Marco Calautti
  • Sergio Greco
  • Cristian Molinaro
  • Irina Trubitsyna
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8620)

Abstract

Enriching answer set programming with function symbols makes modeling easier, increases the expressive power, and allows us to deal with infinite domains. However, this comes at a cost: common inference tasks become undecidable. To cope with this issue, recent research has focused on finding trade-offs between expressivity and decidability by identifying classes of logic programs that impose limitations on the use of function symbols but guarantee decidability of common inference tasks. Despite the significant body of work in this area, current approaches do not include many simple practical programs whose evaluation terminates. In this paper, we present the novel class of rule-bounded programs. While current techniques perform a limited analysis of how terms are propagated from an individual argument to another, our technique is able to perform a more global analysis, thereby overcoming several limitations of current approaches. We also present a further class of cycle-bounded programs where groups of rules are analyzed together. We show different results on the correctness and the expressivity of the proposed techniques.

Keywords

Logic programming with function symbols bottom-up evaluation program evaluation termination stable models 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Alviano, M., Faber, W., Leone, N.: Disjunctive ASP with functions: Decidable queries and effective computation. TPLP 10(4-6), 497–512 (2010)MATHMathSciNetGoogle Scholar
  2. 2.
    Arts, T., Giesl, J.: Termination of term rewriting using dependency pairs. Theoretical Computer Science 236(1-2), 133–178 (2000)MATHMathSciNetCrossRefGoogle Scholar
  3. 3.
    Baselice, S., Bonatti, P.A., Criscuolo, G.: On finitely recursive programs. TPLP 9(2), 213–238 (2009)MATHMathSciNetGoogle Scholar
  4. 4.
    Bonatti, P.A.: Reasoning with infinite stable models. Artificial Intelligence 156(1), 75–111 (2004)MATHMathSciNetCrossRefGoogle Scholar
  5. 5.
    Bruynooghe, M., Codish, M., Gallagher, J.P., Genaim, S., Vanhoof, W.: Termination analysis of logic programs through combination of type-based norms. ACM Trans. Program. Lang. Syst. 29(2) (2007)Google Scholar
  6. 6.
    Calautti, M., Greco, S., Trubitsyna, I.: Detecting decidable classes of finitely ground logic programs with function symbols. In: PPDP, pp. 239–250 (2013)Google Scholar
  7. 7.
    Calimeri, F., Cozza, S., Ianni, G., Leone, N.: Computable functions in ASP: Theory and implementation. In: Garcia de la Banda, M., Pontelli, E. (eds.) ICLP 2008. LNCS, vol. 5366, pp. 407–424. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  8. 8.
    Codish, M., Lagoon, V., Stuckey, P.J.: Testing for termination with monotonicity constraints. In: Gabbrielli, M., Gupta, G. (eds.) ICLP 2005. LNCS, vol. 3668, pp. 326–340. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  9. 9.
    De Schreye, D., Decorte, S.: Termination of logic programs: The never-ending story. Journal of Logic Programming 19/20, 199–260 (1994)Google Scholar
  10. 10.
    Eiter, T., Fink, M., Krennwallner, T., Redl, C.: Liberal safety for answer set programs with external sources. In: AAAI (2013)Google Scholar
  11. 11.
    Endrullis, J., Waldmann, J., Zantema, H.: Matrix interpretations for proving termination of term rewriting. J. Autom. Reas. 40(2-3), 195–220 (2008)MATHMathSciNetCrossRefGoogle Scholar
  12. 12.
    Ferreira, M.C.F., Zantema, H.: andH. Zantema. Total termination of term rewriting. Appl. Algebra Eng. Commun. Comput. 7(2), 133–162 (1996)MATHMathSciNetCrossRefGoogle Scholar
  13. 13.
    Gebser, M., Kaminski, R., Kaufmann, B., Schaub, T.: Answer Set Solving in Practice. In: Synthesis Lectures on Artificial Intelligence and Machine Learning. Morgan & Claypool Publishers (2012)Google Scholar
  14. 14.
    Gebser, M., Schaub, T., Thiele, S.: Gringo: A new grounder for answer set programming. In: Baral, C., Brewka, G., Schlipf, J. (eds.) LPNMR 2007. LNCS (LNAI), vol. 4483, pp. 266–271. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  15. 15.
    Gelfond, M., Lifschitz, V.: The stable model semantics for logic programming. In: ICLP/SLP, pp. 1070–1080 (1988)Google Scholar
  16. 16.
    Gelfond, M., Lifschitz, V.: Classical negation in logic programs and disjunctive databases. New Generation Computing 9(3/4), 365–386 (1991)CrossRefGoogle Scholar
  17. 17.
    Greco, S., Molinaro, C., Trubitsyna, I.: Bounded programs: A new decidable class of logic programs with function symbols. In: IJCAI, pp. 926–932 (2013)Google Scholar
  18. 18.
    Greco, S., Molinaro, C., Trubitsyna, I.: Logic programming with function symbols: Checking Termination of bottom-up Evaluation Through Program Adornments. TPLP 13(4-5), 737–752 (2013)MATHMathSciNetGoogle Scholar
  19. 19.
    Greco, S., Spezzano, F., Trubitsyna, I.: On the termination of logic programs with function symbols. In: ICLP (Technical Communications), pp. 323–333 (2012)Google Scholar
  20. 20.
    Leuschel, M., Vidal, G.: Fast offline partial evaluation of logic programs. Information and Computation 235(0), 70–97 (2014)MATHMathSciNetCrossRefGoogle Scholar
  21. 21.
    Lierler, Y., Lifschitz, V.: One more decidable class of finitely ground programs. In: Hill, P.M., Warren, D.S. (eds.) ICLP 2009. LNCS, vol. 5649, pp. 489–493. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  22. 22.
    Marchiori, M.: Proving existential termination of normal logic programs. In: Nivat, M., Wirsing, M. (eds.) AMAST 1996. LNCS, vol. 1101, pp. 375–390. Springer, Heidelberg (1996)CrossRefGoogle Scholar
  23. 23.
    Nguyen, M.T., Giesl, J., Schneider-Kamp, P., De Schreye, D.: Termination analysis of logic programs based on dependency graphs. In: King, A. (ed.) LOPSTR 2007. LNCS, vol. 4915, pp. 8–22. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  24. 24.
    Nishida, N., Vidal, G.: Termination of narrowing via termination of rewriting. Appl. Algebra Eng. Commun. Comput 21(3), 177–225 (2010)MATHMathSciNetCrossRefGoogle Scholar
  25. 25.
    Ohlebusch, E.: Termination of logic programs: Transformational methods revisited. Appl. Algebra Eng. Commun. Comput. 12(1/2), 73–116 (2001)MATHMathSciNetCrossRefGoogle Scholar
  26. 26.
    Riguzzi, F., Swift, T.: Well-definedness and efficient inference for probabilistic logic programming under the distribution semantics. TPLP 13(2), 279–302 (2013)MATHMathSciNetGoogle Scholar
  27. 27.
    Riguzzi, F., Swift, T.: Terminating evaluation of logic programs with finite three-valued models. ACM Transactions on Computational Logic (2014)Google Scholar
  28. 28.
    Schneider-Kamp, P., Giesl, J., Serebrenik, A., Thiemann, R.: Automated termination proofs for logic programs by term rewriting. ACM Trans. Comput. Log. 11(1) (2009)Google Scholar
  29. 29.
    Schneider-Kamp, P., Giesl, J., Ströder, T., Serebrenik, A., Thiemann, R.: Automated termination analysis for logic programs with cut. TPLP 10(4-6), 365–381 (2010)MATHGoogle Scholar
  30. 30.
    Serebrenik, A., De Schreye, D.: On termination of meta-programs. TPLP 5(3), 355–390 (2005)MATHGoogle Scholar
  31. 31.
    Sohn, K., Van Gelder, A.: Termination detection in logic programs using argument sizes. In: PODS, pp. 216–226 (1991)Google Scholar
  32. 32.
    Sternagel, C., Middeldorp, A.: Root-labeling. In: Voronkov, A. (ed.) RTA 2008. LNCS, vol. 5117, pp. 336–350. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  33. 33.
    Syrjänen, T.: Omega-restricted logic programs. In: Eiter, T., Faber, W., Truszczyński, M. (eds.) LPNMR 2001. LNCS (LNAI), vol. 2173, pp. 267–280. Springer, Heidelberg (2001)Google Scholar
  34. 34.
    Verbaeten, S., De Schreye, D., Sagonas, K.F.: Termination proofs for logic programs with tabling. ACM Trans. Comput. Log. 2(1), 57–92 (2001)MathSciNetCrossRefGoogle Scholar
  35. 35.
    Vidal, G.: Quasi-terminating logic programs for ensuring the termination of partial evaluation. In: PEPM, pp. 51–60 (2007)Google Scholar
  36. 36.
    Voets, D., De Schreye, D.: Non-termination analysis of logic programs with integer arithmetics. TPLP 11(4-5), 521–536 (2011)MATHGoogle Scholar
  37. 37.
    Zantema, H.: Termination of term rewriting by semantic labelling. Fundamenta Informaticae 24(1/2), 89–105 (1995)MATHMathSciNetGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Marco Calautti
    • 1
  • Sergio Greco
    • 1
  • Cristian Molinaro
    • 1
  • Irina Trubitsyna
    • 1
  1. 1.DIMESUniversità della CalabriaRende (CS)Italy

Personalised recommendations