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).
Similar content being viewed by others
References
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).
Bellegarde, F. and Lescanne, P., ‘Termination by Completion’, Applicable Algebra in Engineering, Communication and Computing 1, 79–96 (1990).
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).
Bevers, E. and Lewi, J., ‘Proving Termination of (Conditional) Rewrite Systems’,Acta Informatica 30, 537–568 (1993).
Boyer, R. S. and Moore, J S., A Computational Logic, Academic Press (1979).
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).
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).
Burstall, R. M., ‘Program Proving as Hand Simulation with a little Induction’, in Proc. IFIP Congress 74, Stockholm, Sweden, North-Holland (1974).
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).
Dershowitz, N., ‘Orderings for Term-Rewriting Systems’, Theoretical Computer Science 17, 279–301 (1982).
Dershowitz, N., ‘Termination of Rewriting’, Journal of Symbolic Computation 3(1, 2), 69–115 (1987).
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).
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).
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).
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).
Huet, G. and Hullot, J.-M., ‘Proofs by Induction in Equational Theories with Constructors’, Journal of Computer and System Sciences 25, 239–299 (1982).
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).
Katz, S. and Manna, Z., ‘A Closer Look at Termination’, Acta Informatica 5, 333–352 (1975).
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).
Lankford, D. S., ‘On Proving Term Rewriting Systems are Noetherian’, Technical Report Memo MTP-3, Mathematics Department, Louisiana Technical University (1979).
Manoury, P. and Simonot, M., ‘Automatizing Termination Proofs of Recursively Defined Functions’, Theoretical Computer Science 135, 319–343 (1994).
Manna, Z. and McCarthy, J., ‘Properties of Programs and Partial Function Logic’, Machine Intelligence 5, 27–37 (1970).
Moore, J, ‘A Mechanical Proof of the Termination of Takeuchi’s Function’, Information Processing Letters 9(4), 176–181 (1979).
Nielson, F. and Nielson, H. R., ‘Termination Analysis based on Operational Semantics’, Technical Report, Aarhus University, Denmark (1995).
Paulson, L. C., ‘Proving Termination of Normalization Functions for Conditional Expressions’, Journal of Automated Reasoning 2(1), 63–74 (1986).
Plümer, L., Termination Proofs for Logic Programs, Lecture Notes in Artificial Intelligence 446, Springer–Verlag (1990).
De Schreye, D. and Decorte, S., ‘Termination of Logic Programs: The Never-Ending Story’, Journal of Logic Programming 19, 20, 199–260 (1994).
Steinbach, J., Termination of Rewriting — Extensions, Comparison and Automatic Generation of Simplification Orderings, Doctoral Dissertation, Universität Kaiserslautern, Germany (1994).
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).
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).
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).
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).
Walther, C., ‘On Proving the Termination of Algorithms by Machine’, Artificial Intelligence 71(1), 101–157 (1994).
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Giesl, J. Termination of Nested and Mutually Recursive Algorithms. Journal of Automated Reasoning 19, 1–29 (1997). https://doi.org/10.1023/A:1005797629953
Issue Date:
DOI: https://doi.org/10.1023/A:1005797629953