Skip to main content
Log in

A complexity tradeoff in ranking-function termination proofs

  • Original Article
  • Published:
Acta Informatica Aims and scope Submit manuscript

Abstract

To prove that a program terminates, we can employ a ranking function argument, where program states are ranked so that every transition decreases the rank. Alternatively, we can use a set of ranking functions with the property that every cycle in the program’s flow-chart can be ranked with one of the functions. This “local” approach has gained interest recently on the grounds that local ranking functions would be simpler and easier to find. The current study is aimed at better understanding the tradeoffs involved, in a precise quantitative sense. We concentrate on a convenient setting, the Size-Change Termination framework (SCT). In SCT, programs are replaced by an abstraction whose termination is decidable. Moreover, sufficient classes of ranking functions (both global and local) are known. Our results show a tradeoff: either exponentially many local functions of certain simple forms, or an exponentially complex global function may be required for proving termination.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Avery J.: Size-change termination and bound analysis. In: Hagiya, M., Wadler, P. (eds) Functional and Logic Programming: Eighth International Symposium, FLOPS 2006, Lecture Notes in Computer Science, vol. 3945., Springer, Heidelberg (2006)

    Google Scholar 

  2. Ben-Amram A.M., Codish M.: A SAT-based approach to size change termination with global ranking functions. In: Ramakrishnan, C.R., Rehof, J. (eds) 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS), Lecture Notes in Computer Science, vol. 5028, pp. 46–55. Springer, Heidelberg (2008)

    Google Scholar 

  3. Ben-Amram, A.M., Lee, C.S.: Size-change analysis in polynomial time. ACM Trans. Program. Lang. Syst. 29(1), 5:1–5:37 (2007)

    Google Scholar 

  4. Codish M., Lagoon V., Stuckey P.J.: Testing for termination with monotonicity constraints. In: Gabbrielli, M., Gupta, G. (eds) Logic Programming, 21st International Conference, ICLP 2005, Lecture Notes in Computer Science, vol. 3668, pp. 326–340. Springer, Heidelberg (2005)

    Google Scholar 

  5. Codish, M., Taboch, C.: A semantic basis for termination analysis of logic programs. J. Logic Programming 41(1), 103–123, (1999) preliminary (conference) version in Lecture Notes in Computer Science 1298 (1997)

  6. Cook, B., Podelski, A., Rybalchenko, A.: Termination proofs for systems code. In: Schwartzbach, M.I., Ball, T. (eds.) Proceedings of the ACM SIGPLAN 2006 Conference on Programming Language Design and Implementation (PLDI), Ottawa, Canada, June 2006, pp. 415–426. ACM, New York (2006)

  7. Dershowitz N., Lindenstrauss N., Sagiv Y., Serebrenik A.: A general framework for automatic termination analysis of logic programs. Appl. Algebra Eng. Commun. Comput. 12(1–2), 117–156 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  8. Dershowitz N., Manna Z.: Proving termination with multiset orderings. Commun. ACM 22(8), 465–476 (1979)

    Article  MATH  MathSciNet  Google Scholar 

  9. Jones, N.D., Bohr, N.: Termination analysis of the untyped lambda calculus. In: Proceedings of the 15th International Conference on Rewriting Techniques and Applications, RTA’04, Lecture Notes in Computer Science, vol. 3091, pp. 1–23. Springer, Heidelberg (2004)

  10. Jones N.D., Glenstrup A.: Termination Analysis and Specialization-Point Insertion in Off-Line Partial Evaluation. Technical Report D-498, DIKU. University of Copenhagen, Denmark (2004)

    Google Scholar 

  11. Lee, C.S.: Ranking functions for size-change termination. ACM Trans. Program. Lang. Syst. (to appear) (2008)

  12. Lee, C.S., Jones, N.D., Ben-Amram, A.M.: The size-change principle for program termination. In: Proceedings of the Twenty-Eigth ACM Symposium on Principles of Programming Languages, January 2001, vol. 28, pp. 81–92. ACM Press, New York (2001)

  13. Lindenstrauss, N., Sagiv, Y.: Automatic termination analysis of prolog programs. In: Naish, L. (ed.) Proceedings of the Fourteenth International Conference on Logic Programming, pp. 64–77. MIT Press, Leuven (1997)

  14. Papadimitriou C.H.: Computational Complexity. Addison-Wesley, New York (1994)

    MATH  Google Scholar 

  15. Papadimitriou C.H., Steiglitz K.: Combinatorial Optimization: Algorithms and Complexity. Prentice-Hall, Englewood Cliffs (1982)

    MATH  Google Scholar 

  16. Podelski, A., Rybalchenko, A.: Transition invariants. In: Ganzinger, H. (ed.) LICS’04: Logic in Computer Science, pp. 32–41. IEEE Computer Society (2004)

  17. Sagiv Y.: A termination test for logic programs. In: Saraswat, V., Ueda, K. (eds) Logic Programming, Proceedings of the 1991 International Symposium, San Diego, California, USA, pp. 518–532. MIT Press, Cambridge (1991)

    Google Scholar 

  18. Thiemann R., Giesl J.: The size-change principle and dependency pairs for termination of term rewriting. Appl. Algebra Eng. Commun. Comput. 16(4), 229–270 (2005)

    Article  MATH  MathSciNet  Google Scholar 

  19. Turing, A.M.: Checking a large routine. In: Report of a Conference on High Speed Automatic Calculating Machines, pp. 67–69, (1948). Reprinted in The Early British Computer Conferences. Charles Babbage Institute Reprint Series For The History Of Computing, vol. 14. MIT Press, Cambridge (1989)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Amir M. Ben-Amram.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Ben-Amram, A.M. A complexity tradeoff in ranking-function termination proofs. Acta Informatica 46, 57–72 (2009). https://doi.org/10.1007/s00236-008-0085-0

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00236-008-0085-0

Keywords

Navigation