Abstract
We present a static analysis technique for nontermination inference of logic programs. Our framework relies on an extension of the subsumption test, where some specific argument positions can be instantiated while others are generalized. We give syntactic criteria to statically identify such argument positions from the text of a program. Atomic left looping queries are generated bottom-up from selected subsets of the binary unfoldings of the program of interest. We propose a set of correct algorithms for automating the approach. Then, nontermination inference is tailored to attempt proofs of optimality of left termination conditions computed by a termination inference tool. An experimental evaluation is reported and the analyzers can be tried online at http://www.univ-reunion.fr/~gcc. When termination and nontermination analysis produce complementary results for a logic procedure, then with respect to the leftmost selection rule and the language used to describe sets of atomic queries, each analysis is optimal and together, they induce a characterization of the operational behavior of the logic procedure.
- Apt, K. R. 1997. From Logic Programming to Prolog. Prentice Hall.]] Google Scholar
Digital Library
- Apt, K. R. and Pedreschi, D. 1994. Modular termination proofs for logic and pure Prolog programs. In Advances in Logic Programming Theory, G. Levi, Ed. Oxford University Press, 183--229.]] Google Scholar
Digital Library
- Arts, T. and Zantema, H. 1996. Termination of logic programs using semantic unification. In Logic Program Synthesis and Transformation. Lecture Notes in Computer Science, vol. 1048. Springer-Verlag, Berlin. TALP can be used online at http://bibiserv.techfak.uni.biekefeld.de/talp/.]] Google Scholar
Digital Library
- Bol, R. N. 1993. Loop checking in partial deduction. J. Logic Prog. 16, 25--46.]]Google Scholar
Cross Ref
- Bol, R. N., Apt, K. R., and Klop, J. W. 1991. An analysis of loop checking mechanisms for logic programs. Theor. Comput. Sci. 86, 35--79.]] Google Scholar
Digital Library
- Clark, K. L. 1979. Predicate logic as a computational formalism. Tech. Rep. Doc 79/59, Logic Programming Group, Imperial College, London.]]Google Scholar
- Codish, M. and Taboch, C. 1999. A semantic basis for the termination analysis of logic programs. J. Logic Prog. 41, 1, 103--123.]]Google Scholar
Cross Ref
- De Schreye, D., Bruynooghe, M., and Verschaetse, K. 1989. On the existence of nonterminating queries for a restricted class of Prolog-clauses. Artificial Intelligence 41, 237--248.]] Google Scholar
Digital Library
- De Schreye, D. and Decorte, S. 1994. Termination of logic programs: the never-ending story. J. Logic Prog. 19--20, 199--260.]]Google Scholar
- De Schreye, D., Verschaetse, K., and Bruynooghe, M. 1990. A practical technique for detecting non-terminating queries for a restricted class of Horn clauses, using directed, weighted graphs. In Proceedings of ICLP'90. The MIT Press, 649--663.]] Google Scholar
Digital Library
- Deransart, P. and Ferrand, G. 1987. Programmation en logique avec négation: Présentation formelle. Tech. Rep. 87/3, Laboratoire d'Informatique, Département de Mathématiques et d'Informatique, Université d'Orleans.]]Google Scholar
- Dershowitz, N., Lindenstrauss, N., Sagiv, Y., and Serebrenik, A. 2001. A general framework for automatic termination analysis of logic programs. Applicable Algebra in Engineering,Communication and Computing 12, 1/2, 117--156.]]Google Scholar
- Devienne, P. 1988. Weighted graphs, a tool for expressing the behavious of recursive rules in logic programming. I. for New Generation Computer Technology (ICOT), Ed. OHMSHA Ltd. Tokyo and Springer-Verlag, 397--404. Proceedings of the International Conference on Fifth Generation Computer Systems 88, Tokyo, Japan.]]Google Scholar
- Devienne, P. 1990. Weighted graphs: A tool for studying the halting problem and time complexity in term rewriting systems and logic programming. Theor. Comput. Sci. 75, 2, 157--215.]] Google Scholar
Digital Library
- Devienne, P., Lebègue, P., and Routier, J.-C. 1993. Halting problem of one binary Horn clause is undecidable. In LNCS. Vol. 665. Springer-Verlag, 48--57. Proceedings of STACS'93.]] Google Scholar
Digital Library
- Gabbrielli, M. and Giacobazzi, R. 1994. Goal independency and call patterns in the analysis of logic programs. In Proceedings of the ACM Symposium on Applied Computing. ACM Press, 394--399.]] Google Scholar
Digital Library
- Genaim, S. and Codish, M. 2001. Inferring termination condition for logic programs using backwards analysis. In Proceedings of Logic for Programming, Artificial intelligence and Reasoning. Lecture Notes in Computer Science. Springer-Verlag, Berlin. TerminWeb can be used online from http://www.cs.bgu.ac.il/~codish.]] Google Scholar
Digital Library
- Gori, R. and Levi, G. 1997. Finite failure is and-compositional. J. Logic Comput. 7, 6, 753--776.]]Google Scholar
Cross Ref
- Jaffar, J. and Lassez, J. L. 1987. Constraint logic programming. In Proceedings of the ACM Symposium on Principles of Programming Languages. ACM Press, 111--119.]] Google Scholar
Digital Library
- Lindenstrauss, N. 1997. TermiLog: a system for checking termination of queries to logic programs. http://www.cs.huji.ac.il/~naomil.]]Google Scholar
- Lloyd, J. W. 1987. Foundations of Logic Programming. Springer-Verlag.]] Google Scholar
Digital Library
- Falaschi, M., Levi, G., Martelli, M., and Palamidessi, C. 1993. A model-theoretic reconstruction of the operational semantics of logic programs. Information and Computation 102, 1, 86--113.]] Google Scholar
Digital Library
- Mesnard, F. 1996. Inferring left-terminating classes of queries for constraint logic programs by means of approximations. In Proceedings of the 1996 Joint International Conference and Symposium on Logic Programming, M. J. Maher, Ed. MIT Press, 7--21.]]Google Scholar
- Mesnard, F. and Bagnara, R. 2004. cTI: a constraint-based termination inference tool for ISO-Prolog. Theory and Practice of Logic Programming. To appear.]] Google Scholar
Digital Library
- Mesnard, F. and Neumerkel, U. 2000. cTI: a tool for inferring termination conditions of ISO-Prolog. http://www.univ-reunion.fr/~gcc.]]Google Scholar
- Mesnard, F. and Neumerkel, U. 2001. Applying static analysis techniques for inferring termination conditions of logic programs. In Static Analysis Symposium, P. Cousot, Ed. Lecture Notes in Computer Science, vol. 2126. Springer-Verlag, Berlin, 93--110.]] Google Scholar
Digital Library
- Mesnard, F., Payet, E., and Neumerkel, U. 2002. Detecting optimal termination conditions of logic programs. In Proceedings of the 9th International Symposium on Static Analysis, M. Hermenegildo and G. Puebla, Eds. Lecture Notes in Computer Science, vol. 2477. Springer-Verlag, Berlin, 509--525.]] Google Scholar
Digital Library
- O'Keefe, R. 1990. The Craft of Prolog. MIT Press.]] Google Scholar
Digital Library
- Payet, E. and Mesnard, F. 2004. nontermination inference of logic programs. In Proceedings of the 11th International Symposium on Static Analysis, R. Giacobazzi, Ed. Lecture Notes in Computer Science, vol. 3148. Springer-Verlag, Berlin.]]Google Scholar
- Plümer, L. 1990. Terminations proofs for logic programs. Number 446 in LNAI. Springer-Verlag, Berlin.]] Google Scholar
Digital Library
- Sahlin, D. 1990. The mixtus approach to automatic partial evaluation of full Prolog. In Proceedings of the 1990 North American Conference on Logic Programming, S. Debray and M. Hermenegildo, Eds. MIT Press, Cambridge, MA, 377--398.]] Google Scholar
Digital Library
- Sahlin, D. 1993. Mixtus: an automatic partial evaluator for full Prolog. New Generation Computing 12, 1, 7--51.]] Google Scholar
Digital Library
- Schmidt-Schauss, M. 1988. Implication of clauses is undecidable. Theoretical Computer Science 59, 287--296.]] Google Scholar
Digital Library
- Shen, Y.-D. 1997. An extended variant of atoms loop check for positive logic programs. New Generation Computing 15, 2, 187--204.]] Google Scholar
Digital Library
- Shen, Y.-D., You, J.-H., Yuan, L.-Y., Shen, S., and Yang, Q. 2003. A dynamic approach to characterizing termination of general logic programs. ACM Trans. Comput. Logic 4, 4, 417--434.]] Google Scholar
Digital Library
- Shen, Y.-D., Yuan, L.-Y., and You, J.-H. 2001. Loops checks for logic programs with functions. Theoretical Computer Science 266, 1--2, 441--461.]] Google Scholar
Digital Library
Index Terms
Nontermination inference of logic programs
Recommendations
Termination prediction for general logic programs
We present a heuristic framework for attacking the undecidable termination problem of logic programs, as an alternative to current termination/nontermination proof approaches. We introduce an idea of termination prediction, which predicts termination of ...
Termination prediction for general logic programs
We present a heuristic framework for attacking the undecidable termination problem of logic programs, as an alternative to current termination/nontermination proof approaches. We introduce an idea of termination prediction, which predicts termination of ...
Three-Valued Constructive Logic and Logic Programs
ISMVL '95: Proceedings of the 25th International Symposium on Multiple-Valued LogicAbstract: We propose three valued constructive logic with strong negation 3N by describing both proof and model theory. We relate the proposed three valued system to J. Lukasiewicz's (1920) three valued logic. We demonstrate that 3N is very useful to ...






Comments