Advertisement

Journal of Automated Reasoning

, Volume 19, Issue 1, pp 1–29 | Cite as

Termination of Nested and Mutually Recursive Algorithms

  • Jürgen Giesl
Article

Abstract

This paper deals with automated termination analysis for functional programs. Previously developed methods for automated termination proofs of functional programs often fail for algorithms with nested recursion and they cannot handle algorithms with mutual recursion.

We show that termination proofs for nested and mutually recursive algorithms can be performed without having to prove the correctness of the algorithms simultaneously. Using this result, nested and mutually recursive algorithms do no longer constitute a special problem and the existing methods for automated termination analysis can be extended to nested and mutual recursion in a straightforward way. We give some examples of algorithms whose termination can now be proved automatically (including well-known challenge problems such as McCarthy’s f_91 function).

automated termination analysis induction theorem proving functional programming 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Arts, T. and Giesl, J., ‘Termination of Constructor Systems’, in Proceedings of the 7th International Conference on Rewriting Techniques and Applications, New Brunswick, NJ, Lecture Notes in Computer Science 1103, Springer-Verlag (1996).Google Scholar
  2. 2.
    Bellegarde, F. and Lescanne, P., ‘Termination by Completion’, Applicable Algebra in Engineering, Communication and Computing 1, 79–96 (1990).Google Scholar
  3. 3.
    Ben Cherifa, A. and Lescanne, P., ‘Termination of Rewriting Systems by Polynomial Interpretations and its Implementation’, Science of Computer Programming 9(2), 137–59 (1987).Google Scholar
  4. 4.
    Bevers, E. and Lewi, J., ‘Proving Termination of (Conditional) Rewrite Systems’,Acta Informatica 30, 537–568 (1993).Google Scholar
  5. 5.
    Boyer, R. S. and Moore, J S., A Computational Logic, Academic Press (1979).Google Scholar
  6. 6.
    Boyer, R. S. and Moore, J. S., ‘The Addition of Bounded Quantification and Partial Functions to A Computational Logic and Its Theorem Prover’,Journal of Automated Reasoning 4, 117–172 (1988).Google Scholar
  7. 7.
    7. Bundy, A., Stevens, A., van Harmelen, F., Ireland, A., and Smaill, A., ‘Rippling: A Heuristic for Guiding Inductive Proofs’, Artificial Intelligence 62, 185–253 (1993).Google Scholar
  8. 8.
    Burstall, R. M., ‘Program Proving as Hand Simulation with a little Induction’, in Proc. IFIP Congress 74, Stockholm, Sweden, North-Holland (1974).Google Scholar
  9. 9.
    Collins, G. E., ‘Quantifier Elimination for Real Closed Fields by Cylindrical Algebraic Decomposition’, in Proceedings of the Second GI Conference on Automata Theory and Formal Languages, Kaiserslautern, Germany, Lecture Notes in Computer Science 33, Springer-Verlag (1975).Google Scholar
  10. 10.
    Dershowitz, N., ‘Orderings for Term-Rewriting Systems’, Theoretical Computer Science 17, 279–301 (1982).Google Scholar
  11. 11.
    Dershowitz, N., ‘Termination of Rewriting’, Journal of Symbolic Computation 3(1, 2), 69–115 (1987).Google Scholar
  12. 12.
    Feferman, S., ‘Proofs of Termination and the "91" Function’, in Artificial Intelligence and Mathematical Theory of Computation: Papers in Honor of John McCarthy(ed. V. Lifschitz), Academic Press (1991).Google Scholar
  13. 13.
    Giesl, J., ‘Generating Polynomial Orderings for Termination Proofs’, in Proceedings of the 6th International Conference on Rewriting Techniques and Applications, Kaiserslautern, Germany, Lecture Notes in Computer Science 914, Springer-Verlag (1995).Google Scholar
  14. 14.
    Giesl, J., ‘Automated Termination Proofs with Measure Functions’, in Proceedings of the 19th Annual German Conference on Artificial Intelligence, Bielefeld, Germany, Lecture Notes in Artificial Intelligence 981, Springer-Verlag (1995).Google Scholar
  15. 15.
    Giesl, J., ‘Termination Analysis for Functional Programs using Term Orderings’, in Proceedings of the Second International Static Analysis Symposium, Glasgow, Scotland, Lecture Notes in Computer Science 983, Springer-Verlag (1995).Google Scholar
  16. 16.
    Huet, G. and Hullot, J.-M., ‘Proofs by Induction in Equational Theories with Constructors’, Journal of Computer and System Sciences 25, 239–299 (1982).Google Scholar
  17. 17.
    Kamin, S. and Levy, J.-J., ‘Two Generalizations of the Recursive Path Ordering’, Unpublished Note, Department of Computer Science, University of Illinois, Urbana, IL (1980).Google Scholar
  18. 18.
    Katz, S. and Manna, Z., ‘A Closer Look at Termination’, Acta Informatica 5, 333–352 (1975).Google Scholar
  19. 19.
    Knuth, D. E., ‘Textbook Examples of Recursion’, in Artificial Intelligence and Mathematical Theory of Computation: Papers in Honor of John McCarthy(ed. V. Lifschitz), Academic Press (1991).Google Scholar
  20. 20.
    Lankford, D. S., ‘On Proving Term Rewriting Systems are Noetherian’, Technical Report Memo MTP-3, Mathematics Department, Louisiana Technical University (1979).Google Scholar
  21. 21.
    Manoury, P. and Simonot, M., ‘Automatizing Termination Proofs of Recursively Defined Functions’, Theoretical Computer Science 135, 319–343 (1994).Google Scholar
  22. 22.
    Manna, Z. and McCarthy, J., ‘Properties of Programs and Partial Function Logic’, Machine Intelligence 5, 27–37 (1970).Google Scholar
  23. 23.
    Moore, J, ‘A Mechanical Proof of the Termination of Takeuchi’s Function’, Information Processing Letters 9(4), 176–181 (1979).Google Scholar
  24. 24.
    Nielson, F. and Nielson, H. R., ‘Termination Analysis based on Operational Semantics’, Technical Report, Aarhus University, Denmark (1995).Google Scholar
  25. 25.
    Paulson, L. C., ‘Proving Termination of Normalization Functions for Conditional Expressions’, Journal of Automated Reasoning 2(1), 63–74 (1986).Google Scholar
  26. 26.
    Plümer, L., Termination Proofs for Logic Programs, Lecture Notes in Artificial Intelligence 446, Springer–Verlag (1990).Google Scholar
  27. 27.
    De Schreye, D. and Decorte, S., ‘Termination of Logic Programs: The Never-Ending Story’, Journal of Logic Programming 19, 20, 199–260 (1994).Google Scholar
  28. 28.
    Steinbach, J., Termination of Rewriting — Extensions, Comparison and Automatic Generation of Simplification Orderings, Doctoral Dissertation, Universität Kaiserslautern, Germany (1994).Google Scholar
  29. 29.
    Steinbach, J., ‘Automatic Termination Proofs with Transformation Orderings’, in Proceedings of the 6th International Conference on Rewriting Techniques and Applications, Kaiserslautern, Germany, Lecture Notes in Computer Science 914, Springer-Verlag (1995).Google Scholar
  30. 30.
    Ullman, J. D. and van Gelder, A., ‘Efficient Tests for Top-Down Termination of Logical Rules’, Journal of the ACM 35(2), 345–373 (1988).Google Scholar
  31. 31.
    Walther, C., ‘Argument-Bounded Algorithms as as Basis for Automated Termination Proofs’, in Proceedings of the 9th International Conference on Automated Deduction, Argonne, IL, Lecture Notes in Computer Science 310, Springer-Verlag (1988).Google Scholar
  32. 32.
    Walther, C., ‘Mathematical Induction’, in Handbook of Logic in Artificial Intelligence and Logic Programming, Vol.2(eds. D. M. Gabbay, C. J. Hogger, and J. A. Robinson), Oxford University Press (1994).Google Scholar
  33. 33.
    Walther, C., ‘On Proving the Termination of Algorithms by Machine’, Artificial Intelligence 71(1), 101–157 (1994).Google Scholar

Copyright information

© Kluwer Academic Publishers 1997

Authors and Affiliations

  • Jürgen Giesl
    • 1
  1. 1.FB Informatik, TH DarmstadtDarmstadtGermany

Personalised recommendations