Hostname: page-component-586b7cd67f-gb8f7 Total loading time: 0 Render date: 2024-11-24T18:23:16.422Z Has data issue: false hasContentIssue false

Using linear constraints for logic program termination analysis

Published online by Cambridge University Press:  31 March 2016

MARCO CALAUTTI
Affiliation:
DIMES, Università della Calabria, 87036 Rende(CS), Italy (e-mail: [email protected], [email protected], [email protected], [email protected])
SERGIO GRECO
Affiliation:
DIMES, Università della Calabria, 87036 Rende(CS), Italy (e-mail: [email protected], [email protected], [email protected], [email protected])
CRISTIAN MOLINARO
Affiliation:
DIMES, Università della Calabria, 87036 Rende(CS), Italy (e-mail: [email protected], [email protected], [email protected], [email protected])
IRINA TRUBITSYNA
Affiliation:
DIMES, Università della Calabria, 87036 Rende(CS), Italy (e-mail: [email protected], [email protected], [email protected], [email protected])

Abstract

It is widely acknowledged that function symbols are an important feature in answer set programming, as they make modelling easier, increase the expressive power, and allow us to deal with infinite domains. The main issue with their introduction is that the evaluation of a program might not terminate and checking whether it terminates or not is undecidable. To cope with this problem, several classes of logic programs have been proposed where the use of function symbols is restricted but the program evaluation termination is guaranteed. 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 classes of rule-bounded and cycle-bounded programs, which overcome different limitations of current approaches by performing a more global analysis of how terms are propagated from the body to the head of rules. Results on the correctness, the complexity, and the expressivity of the proposed approach are provided.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2016 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Alviano, M., Faber, W. and Leone, N. 2010. Disjunctive ASP with functions: Decidable queries and effective computation. Theory and Practice of Logic Programming 10, 4–6, 497512.Google Scholar
Arts, T. and Giesl, J. 2000. Termination of term rewriting using dependency pairs. Theoretical Computer Science 236, 1–2, 133178.Google Scholar
Baselice, S., Bonatti, P. A. and Criscuolo, G. 2009. On finitely recursive programs. Theory and Practice of Logic Programming 9, 2, 213238.Google Scholar
Bonatti, P. A. 2004. Reasoning with infinite stable models. Artificial Intelligence 156, 1, 75111.Google Scholar
Bruynooghe, M., Codish, M., Gallagher, J. P., Genaim, S. and Vanhoof, W. 2007. Termination analysis of logic programs through combination of type-based norms. ACM Transactions on Programming Languages and Systems 29, 2.Google Scholar
Calautti, M., Greco, S., Molinaro, C. and Trubitsyna, I. 2014. Checking termination of logic programs with function symbols through linear constraints. In Proc. of the 8th International Web Rule Symposium. Lecture Notes in Computer Science, Vol. 8620. Springer, 97111.Google Scholar
Calautti, M., Greco, S., Spezzano, F. and Trubitsyna, I. 2015. Checking termination of bottom-up evaluation of logic programs with function symbols. Theory and Practice of Logic Programming 15, 6, 854889.CrossRefGoogle Scholar
Calautti, M., Greco, S. and Trubitsyna, I. 2013. Detecting decidable classes of finitely ground logic programs with function symbols. In Proc. of the 15th International Symposium on Principles and Practice of Declarative Programming, ACM Press, 239250.Google Scholar
Calì, A., Gottlob, G., Lukasiewicz, T., Marnette, B. and Pieris, A. 2010. Datalog+/-: A family of logical knowledge representation and query languages for new applications. In Proc. of the 25th Symposium on Logic in Computer Science, IEEE Computer Society, 228242.Google Scholar
Calimeri, F., Cozza, S., Ianni, G. and Leone, N. 2008. Computable functions in ASP: Theory and implementation. In Proc. of the 24th International Conference on Logic Programming. Lecture Notes in Computer Science, Vol. 5366. Springer, 407–424.Google Scholar
Ceri, S., Gottlob, G. and Tanca, L. 1990. Logic Programming and Databases. Springer, New York.Google Scholar
Chaudhri, V. K., Heymans, S., Tran, S. and Wessel, M. A. 2013. Object-oriented knowledge bases in logic programming. Theory and Practice of Logic Programming 13, 4–5-Online-Supplement.Google Scholar
Codish, M., Lagoon, V. and Stuckey, P. J. 2005. Testing for termination with monotonicity constraints. In Proc. of the 21st International Conference on Logic Programming. Lecture Notes in Computer Science, Vol. 3668. Springer, 326–340.Google Scholar
De Schreye, D. and Decorte, S. 1994. Termination of logic programs: The never-ending story. Journal of Logic Programming 19/20, 199260.Google Scholar
Eiter, T., Fink, M., Krennwallner, T. and Redl, C. 2013. Liberal safety for answer set programs with external sources. In Proc. of the 27th AAAI Conference on Artificial Intelligence, AAAI Press, 267–275.Google Scholar
Endrullis, J., Waldmann, J. and Zantema, H. 2008. Matrix interpretations for proving termination of term rewriting. Journal of Automated Reasoning 40, 2–3, 195220.CrossRefGoogle Scholar
Ferreira, M. C. F. and Zantema, H. 1996. Total termination of term rewriting. Applicable Algebra in Engineering, Communication and Computing 7, 2, 133162.Google Scholar
Gebser, M., Kaminski, R., Kaufmann, B. and Schaub, T. 2012. Answer Set Solving in Practice. Synthesis Lectures on Artificial Intelligence and Machine Learning. Morgan & Claypool Publishers.Google Scholar
Gebser, M., Schaub, T. and Thiele, S. 2007. Gringo: A new grounder for answer set programming. In Proc. of the 9th International Conference on Logic Programming and Nonmonotonic Reasoning. Lecture Notes in Computer Science, Vol. 4483. Springer, 266–271.Google Scholar
Gelfond, M. and Lifschitz, V. 1988. The stable model semantics for logic programming. In Proc. of the 5th International Conference and Symposium on Logic Programming, MIT Press, 1070–1080.Google Scholar
Gelfond, M. and Lifschitz, V. 1991. Classical negation in logic programs and disjunctive databases. New Generation Computing 9, 3/4, 365386.Google Scholar
Greco, S. 1999. Dynamic programming in datalog with aggregates. IEEE Transactions on Knowledge and Data Engineering 11, 2, 265283.Google Scholar
Greco, S., Molinaro, C. and Spezzano, F. 2012. Incomplete Data and Data Dependencies in Relational Databases. Synthesis Lectures on Data Management. Morgan & Claypool Publishers.Google Scholar
Greco, S., Molinaro, C. and Trubitsyna, I. 2013a. Bounded programs: A new decidable class of logic programs with function symbols. In Proc. of the 23rd International Joint Conference on Artificial Intelligence, IJCAI/AAAI, 926–932.Google Scholar
Greco, S., Molinaro, C. and Trubitsyna, I. 2013b. Logic programming with function symbols: Checking termination of bottom-up evaluation through program adornments. Theory and Practice of Logic Programming 13, 4–5, 737752.CrossRefGoogle Scholar
Greco, S., Molinaro, C., Trubitsyna, I. and Zumpano, E. 2010. NP datalog: A logic language for expressing search and optimization problems. Theory and Practice of Logic Programming 10, 2, 125166.Google Scholar
Greco, S. and Spezzano, F. 2010. Chase termination: A constraints rewriting approach. Proc. of the VLDB Endowment 3, 1, 93104.Google Scholar
Greco, S., Spezzano, F. and Trubitsyna, I. 2011. Stratification criteria and rewriting techniques for checking chase termination. Proc. of the VLDB Endowment 4, 11, 11581168.Google Scholar
Greco, S., Spezzano, F. and Trubitsyna, I. 2012. On the termination of logic programs with function symbols. In Technical Communications of the 28th International Conference on Logic Programming. LIPIcs, Vol. 17. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 323–333.Google Scholar
Greco, S., Zaniolo, C. and Ganguly, S. 1992. Greedy by choice. In Proc. of the 11th Symposium on Principles of Database Systems, ACM Press, 105113.Google Scholar
Leuschel, M. and Vidal, G. 2014. Fast offline partial evaluation of logic programs. Information and Computation 235, 0, 7097.Google Scholar
Lierler, Y. and Lifschitz, V. 2009. One more decidable class of finitely ground programs. In Proc. of the 25th International Conference on Logic Programming. Lecture Notes in Computer Science, Vol. 5649. Springer, 489–493.Google Scholar
Marchiori, M. 1996. Proving existential termination of normal logic programs. In Proc. of the 5th International Conference on Algebraic Methodology and Software Technology. Lecture Notes in Computer Science, Vol. 1101. Springer, 375–390.Google Scholar
Marnette, B. 2009. Generalized schema-mappings: from termination to tractability. In Proc. of the 28th Symposium on Principles of Database Systems, ACM Press, 1322.Google Scholar
Meier, M. 2010. On the Termination of the Chase Algorithm. Albert-Ludwigs-Universitat Freiburg, Germany.Google Scholar
Nguyen, M. T., Giesl, J., Schneider-Kamp, P. and De Schreye, D. 2007. Termination analysis of logic programs based on dependency graphs. In Proc. of the 17th International Symposium on Logic-based Program Synthesis and Transformation. Lecture Notes in Computer Science, Vol. 4915. Springer, 822.Google Scholar
Nishida, N. and Vidal, G. 2010. Termination of narrowing via termination of rewriting. Applicable Algebra in Engineering, Communication and Computing 21, 3, 177225.Google Scholar
Ohlebusch, E. 2001. Termination of logic programs: Transformational methods revisited. Applicable Algebra in Engineering, Communication and Computing 12, 1/2, 73116.Google Scholar
Onet, A. 2013. The chase procedure and its applications in data exchange. In Data Exchange, Integration, and Streams. Dagstuhl Follow-Ups, Vol. 5. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 137.Google Scholar
Palopoli, L. 1992. Testing logic programs for local stratification. Theoretical Computer Science 103, 2, 205234.Google Scholar
Papadimitriou, C. H. 1981. On the complexity of integer programming. Journal of the ACM 28, 4, 765768.Google Scholar
Riguzzi, F. and Swift, T. 2013. Well-definedness and efficient inference for probabilistic logic programming under the distribution semantics. Theory and Practice of Logic Programming 13, 2, 279302.CrossRefGoogle Scholar
Riguzzi, F. and Swift, T. 2014. Terminating evaluation of logic programs with finite three-valued models. ACM Transactions on Computational Logic 15, 4, 32:1–32:38.Google Scholar
Schneider-Kamp, P., Giesl, J., Serebrenik, A. and Thiemann, R. 2009. Automated termination proofs for logic programs by term rewriting. ACM Transactions on Computational Logic 11, 1, 2:12:52.Google Scholar
Schneider-Kamp, P., Giesl, J., Ströder, T., Serebrenik, A. and Thiemann, R. 2010. Automated termination analysis for logic programs with cut. Theory and Practice of Logic Programming 10, 4–6, 365381.Google Scholar
Serebrenik, A. and De Schreye, D. 2005. On termination of meta-programs. Theory and Practice of Logic Programming 5, 3, 355390.Google Scholar
Sohn, K. and Gelder, A. V. 1991. Termination detection in logic programs using argument sizes. In Proc. of the 10th Symposium on Principles of Database Systems, ACM Press, 216226.Google Scholar
Sternagel, C. and Middeldorp, A. 2008. Root-labeling. In Proc. of the 19th International Conference on Rewriting Techniques and Applications. Lecture Notes in Computer Science, Vol. 5117. Springer, 336–350.Google Scholar
Syrjanen, T. 2001. Omega-restricted logic programs. In Proc. of the 6th International Conference on Logic Programming and Non-Monotonic Reasoning. Lecture Notes in Computer Science, Vol. 2173. Springer, 267–279.Google Scholar
Venturini Zilli, M. 1975. Complexity of the unification algorithm for first-order expressions. Calcolo 12, 4, 361371.CrossRefGoogle Scholar
Verbaeten, S., De Schreye, D. and Sagonas, K. F. 2001. Termination proofs for logic programs with tabling. ACM Transactions on Computational Logic 2, 1, 5792.Google Scholar
Vidal, G. 2007. Quasi-terminating logic programs for ensuring the termination of partial evaluation. In Proc. of the 2007 Workshop on Partial Evaluation and Semantics-based Program Manipulation, ACM Press, 5160.Google Scholar
Voets, D. and De Schreye, D. 2011. Non-termination analysis of logic programs with integer arithmetics. Theory and Practice of Logic Programming 11, 4–5, 521536.Google Scholar
Zantema, H. 1995. Termination of term rewriting by semantic labelling. Fundamenta Informaticae 24, 1/2, 89105.Google Scholar