Skip to main content

Termination analysis for functional programs using term orderings

  • Contributed Papers
  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 983))

Abstract

To prove the termination of a functional program there has to be a well-founded ordering such that the arguments in each recursive call are smaller than the corresponding inputs. In this paper we present a procedure for automated termination proofs of functional programs. In contrast to previously presented methods a suited well-founded ordering does not have to be fixed in advance by the user, but can be synthesized automatically.

For that purpose we use approaches developed in the area of term rewriting systems for the automated generation of suited well-founded term orderings. But unfortunately term orderings cannot be directly used for termination proofs of functional programs which call other algorithms in the arguments of their recursive calls. The reason is that while for the termination of term rewriting systems orderings between terms are needed, for functional programs we need orderings between objects of algebraic data types. Our method solves this problem and enables term orderings to be used for termination proofs of functional programs.

This is a preview of subscription content, log in via an institution.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. H. Aït-Kaci. An Algorithm for Finding a Minimal Recursive Path Ordering. RAIRO, 19(4):359–382, 1985.

    Google Scholar 

  2. F. Bellegarde & P. Lescanne. Termination by Completion. Applicable Algebra in Engineering, Communication and Computing, 1:79–96, 1990.

    Google Scholar 

  3. A. Ben Cherifa & P. Lescanne. Termination of Rewriting Systems by Polynomial Interpretations and its Implementation. Science of Computer Programming, 9(2):137–159, 1987.

    Google Scholar 

  4. E. Bevers & J. Lewi. Proving Termination of (Conditional) Rewrite Systems. Acta Informatica, 30:537–568, 1993.

    Google Scholar 

  5. S. Biundo, B. Hummel, D. Hutter & C. Walther. The Karlsruhe Induction Theorem Proving System. In Proceedings of the 8th International Conference on Automated Deduction, Oxford, England, 1986.

    Google Scholar 

  6. R. S. Boyer & J. S. Moore. A Computational Logic. Academic Press, 1979.

    Google Scholar 

  7. A. Bundy, F. van Harmelen, C. Horn & A. Smaill. The oyster-clam System. In Proceedings of the 10th International Conference on Automated Deduction, Kaiserslautern, Germany, 1990.

    Google Scholar 

  8. G. E. Collins. 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, 1975.

    Google Scholar 

  9. S. Decorte, D. De Schreye & M. Fabris. Automatic Inference of Norms: A Missing Link in Automatic Termination Analysis. In Proceedings of the International Logic Programming Symposium, Vancouver, Canada, 1993.

    Google Scholar 

  10. D. Detlefs & R. Forgaard. A Procedure for Automatically Proving the Termination of a Set of Rewrite Rules. In Proceedings of the First International Conference on Rewriting Techniques and Applications, Dijon, France, 1985.

    Google Scholar 

  11. N. Dershowitz. A Note on Simplification Orderings. Information Processing Letters, 9(5):212–215, 1979.

    Google Scholar 

  12. N. Dershowitz. Termination of Rewriting. Journal of Symbolic Computation, 3(1, 2):69–115, 1987.

    Google Scholar 

  13. N. Dershowitz & C. Hoot. Topics in Termination. In Proceedings of the 5th International Conference on Rewriting Techniques and Applications, Montreal, Canada, 1993.

    Google Scholar 

  14. J. Giesl. Generating Polynomial Orderings for Termination Proofs. In Proceedings of the 6th International Conference on Rewriting Techniques and Applications, Kaiserslautern, Germany, 1995.

    Google Scholar 

  15. J. Giesl. Automatisierung von Terminierungsbeweisen für rekursiv definierte Algorithmen. Doctoral Dissertation, Technische Hochschule Darmstadt, Germany, 1995.

    Google Scholar 

  16. J. Giesl. Automated Termination Proofs with Measure Functions. In Proceedings of the 19th Annual German Conference on Artificial Intelligence, Bielefeld, Germany, 1995.

    Google Scholar 

  17. S. Keimin & J.-J. Levy. Two Generalizations of the Recursive Path Ordering. Unpublished Note, Department of Computer Science, University of Illinois, Urbana, IL, 1980.

    Google Scholar 

  18. D. S. Lankford. On Proving Term Rewriting Systems are Noetherian. Technical Report Memo MTP-3, Mathematics Department, Louisiana Technical University, 1979.

    Google Scholar 

  19. U. Martin. How to choose Weights in the Knuth-Bendix Ordering. In Proceedings of the Second International Conference on Rewriting Techniques and Applications, Bordeaux, France, 1987.

    Google Scholar 

  20. F. Nielson & H. R. Nielson. Termination Analysis based on Operational Semantics. Technical Report, Aarhus University, Denmark, 1995. Available from http://www.daimi.aau.dk/rfn/papars/pb492.ps.z.

    Google Scholar 

  21. C. S. Peirce. Collected Papers of C. Sanders Peirce, vol. 2. Hartshorne et al. (eds.), Harvard University Press, Cambridge, MA, 1931.

    Google Scholar 

  22. L. Plümer. Termination Proofs for Logic Programs. Springer-Verlag, 1990.

    Google Scholar 

  23. D. De Schreye & S. Decorte. Termination of Logic Programs: The Never-Ending Story. Technical Report Compulog II, D 8.1.1, K. U. Leuven, Belgium, 1993.

    Google Scholar 

  24. K. Sohn & A. van Gelder. Termination Detection in Logic Programs using Argument Sizes. In Proceedings of the 10th ACM Symposium on Principles of Database Systems, Denver, Colorado, 1991.

    Google Scholar 

  25. J. Steinbach. Termination of Rewriting-Extensions, Comparison and Automatic Generation of Simplification Orderings. Doctoral Dissertation, Universität Kaiserslautern, Germany, 1994.

    Google Scholar 

  26. J. Steinbach. Automatic Termination Proofs with Transformation Orderings. In Proceedings of the 6th International Conference on Rewriting Techniques and Applications, Kaiserslautern, Germany, 1995.

    Google Scholar 

  27. J. D. Ullman & A. van Gelder. Efficient Tests for Top-Down Termination of Logical Rules. Journal of the ACM, 35(2):345–373, 1988.

    Google Scholar 

  28. C. Walther. Argument-Bounded Algorithms as as Basis for Automated Termination Proofs. In Proceedings of the 9th International Conference on Automated Deduction, Argonne, IL, 1988.

    Google Scholar 

  29. C. Walther. On Proving the Termination of Algorithms by Machine. Artificial Intelligence, 71(1):101–157, 1994.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Alan Mycroft

Rights and permissions

Reprints and permissions

Copyright information

© 1995 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Giesl, J. (1995). Termination analysis for functional programs using term orderings. In: Mycroft, A. (eds) Static Analysis. SAS 1995. Lecture Notes in Computer Science, vol 983. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-60360-3_38

Download citation

  • DOI: https://doi.org/10.1007/3-540-60360-3_38

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-60360-3

  • Online ISBN: 978-3-540-45050-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics