skip to main content
10.1145/360204.360210acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article

The size-change principle for program termination

Authors Info & Claims
Published:01 January 2001Publication History

ABSTRACT

The "size-change termination" principle for a first-order functional language with well-founded data is: a program terminates on all inputs if every infinite call sequence (following program control flow) would cause an infinite descent in some data values.Size-change analysis is based only on local approximations to parameter size changes derivable from program syntax. The set of infinite call sequences that follow program flow and can be recognized as causing infinite descent is an ω-regular set, representable by a Büchi automaton. Algorithms for such automata can be used to decide size-change termination. We also give a direct algorithm operating on "size-change graphs" (without the passage to automata).Compared to other results in the literature, termination analysis based on the size-change principle is surprisingly simple and general: lexical orders (also called lexicographic orders), indirect function calls and permuted arguments (descent that is not in-situ) are all handled automatically and without special treatment, with no need for manually supplied argument orders, or theorem-proving methods not certain to terminate at analysis time.We establish the problem's intrinsic complexity. This turns out to be surprisingly high, complete for PSPACE, in spite of the simplicity of the principle. PSPACE hardness is proved by a reduction from Boolean program termination. An ineresting consequence: the same hardness result applies to many other analyses found in the termination and quasitermination literature.

References

  1. 1.Andreas Abel and Thorsten Altenkirch. A semantical analysis of structural recursion. In Abstracts of the Fourth International Workshop on Termination WST'99: pages 24-25. unpublished: May 1999.Google ScholarGoogle Scholar
  2. 2.Peter Hoist Andersen and Carsten Kehler Hoist. Termination analysis for offline partial evaluation of a higher order functional language. In Static Analysis, Proceedings of the Third International Symposium, SAS '96, Aachen, Germany, Sep 24-26, 1996, volume 1145 of Lecture Notes in Computer Science, pages 67-82. Springer, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.Thomas Arts. Automatically Proving Termination and Innermost Normalisation of Term Rewriting Systems. PhD thesis, Universiteit Utrecht, 1997.Google ScholarGoogle Scholar
  4. 4.Thomas Arts and Jiirgen Giesl. Proving innermost termination automatically. In Proceedings Rewriting Techniques and Applications RTA '97, volume 1232 of Lecture Notes in Computer Science, pages 157-171. Springer, 1997. Google ScholarGoogle Scholar
  5. 5.Anders Bondorf. Similix manual. Technical Report 91/9, DIKU, University of Copenhagen, Denmark, 1991.Google ScholarGoogle Scholar
  6. 6.Wei Ngan Chin and Siau Cheng Khoo. Calculating sized types. In Julia Lawall, editor, ACM SIGPLAN Workshop on Partial Evaluation and Semantics-based Program Manipulation, Boston, Mass., USA. ACM, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.Michael Codish and Cohavit Taboch. A semantic basis for termination analysis of logic programs and its realization using symbolic norm constraints. In Michael Hanus, Jan Heering, and Karl Meinke, editors, Algebraic and Logic Programming, 6th International Joint Conference, ALP '97-HOA '97, Southampton, U.K., September 3-5, 1997, volume 1298 of Lecture Notes in Computer Science, pages 31-45. Springer, 1997. Google ScholarGoogle Scholar
  8. 8.Jiirgen Giesl. Termination analysis for functional programs using term orderings. In Alan Mycroft, editor, Proc. 2nd Int'l Static Analysis Symposium (SAS), Glasgow, Scotland, volume 983 of Lecture Notes in Computer Science, pages 154-171. Springer-Verlag, September 1995. Google ScholarGoogle Scholar
  9. 9.Arne J. Glenstrup. Terminator II: Stopping partial evaluation of fully recursive programs. Master's thesis, DIKU, University of Copenhagen, Denmark, 1999.Google ScholarGoogle Scholar
  10. 10.Arne J. Glenstrup and Neil D. Jones. BTA algorithms to ensure termination of off-line partial evaluation. In Perspectives of System Informatics, Proceedings of the Second International Andrei Ershov Memorial Conference, Akademgorodok, Novosibirsk, Russia, Jun 25-28, 1996, volume 1181 of Lecture Notes in Computer Science, pages 273-284. Springer, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11.C. A. R. Hoare. An axiomatic basis for computer programming. Communications of the ACM (CACM), 12(10):576-580, October 1969. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.Carsten Kehler Hoist. Finiteness analysis. In John Hughes, editor, Functional Programming Languages and Computer Architecture, Cambridge, Massachusetts, August 1991, volume 523 of Lecture Notes in Computer Science, pages 473-495. Springer, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.Neil D. Jones. Computability and Complexity From a Programming Perspective. Foundations of Computing Series. MIT Press, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14.Naomi Lindenstrauss and Yehoshua Sagiv. Automatic termination analysis of Prolog programs. In Lee Naish, editor, Proceedings of the Fourteenth International Conference on Logic Programming, pages 64-77, Leuven, Belgium, Jul 1997. MIT Press.Google ScholarGoogle Scholar
  15. 15.Lutz Pliimer. Termination Proofs for Logic Programs, volume 446 of Lecture Notes in Artificial Intelligence. Springer-Verlag, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.S. Safra. On the complexity of omega-automata. In Proceedings of the 29th IEEE Symposium on Foundations of Computer Science, pages 319-327, IEEE, 1988.Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.Yehoshua Sagiv. A termination test for logic programs. In Vijay Saraswat and Kazunori Ueda, editors, Logic Programming, Proceedings of the 1991 International Symposium, San Diego, California, USA, Oct 28-Nov 1, 1991, pages 518-532. MIT Press, 1991.Google ScholarGoogle Scholar
  18. 18.A. Prasad Sistla, Moshe Y. Vardi, and Pierre Wolper. The complementation problem for Biichi automata with applications to temporal logic. Theoretical Computer Science, 49:217-237, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.Chris Speirs, Zoltan Somogyi, and Harald Sondergaard. Termination analysis for Mercury. In Pascal Van Hentenryck, editor, Static Analysis, Proceedings of the 4th International Symposium, SAS '97, Paris, France, Sep 8-19, 1997, volume 1302 of Lecture Notes in Computer Science, pages 160-171. Springer, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.Joachim Steinbach. Automatic termination proofs with transformation orderings. In Jieh Hsiang, editor, Rewriting Techniques and Applications, Proceedings of the 6th International Conference, RTA-95, Kaiserslautern, Germany, April 5-7, 1995, volume 914 of Lecture Notes in Computer Science, pages 11-25. Springer, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. The size-change principle for program termination

                    Recommendations

                    Comments

                    Login options

                    Check if you have access through your login credentials or your institution to get full access on this article.

                    Sign in
                    • Published in

                      cover image ACM Conferences
                      POPL '01: Proceedings of the 28th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
                      January 2001
                      304 pages
                      ISBN:1581133367
                      DOI:10.1145/360204

                      Copyright © 2001 ACM

                      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                      Publisher

                      Association for Computing Machinery

                      New York, NY, United States

                      Publication History

                      • Published: 1 January 2001

                      Permissions

                      Request permissions about this article.

                      Request Permissions

                      Check for updates

                      Qualifiers

                      • Article

                      Acceptance Rates

                      POPL '01 Paper Acceptance Rate24of126submissions,19%Overall Acceptance Rate824of4,130submissions,20%

                      Upcoming Conference

                      POPL '25

                    PDF Format

                    View or Download as a PDF file.

                    PDF

                    eReader

                    View online with eReader.

                    eReader