Advertisement

Acta Informatica

, Volume 46, Issue 1, pp 57–72 | Cite as

A complexity tradeoff in ranking-function termination proofs

  • Amir M. Ben-Amram
Original Article

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.

Keywords

Logic Program Ranking Function Directed Cycle Termination Proof Monotonicity Constraint 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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. 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. 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. 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. 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)Google Scholar
  6. 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)Google Scholar
  7. 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)MATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Dershowitz N., Manna Z.: Proving termination with multiset orderings. Commun. ACM 22(8), 465–476 (1979)MATHCrossRefMathSciNetGoogle Scholar
  9. 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)Google Scholar
  10. 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. 11.
    Lee, C.S.: Ranking functions for size-change termination. ACM Trans. Program. Lang. Syst. (to appear) (2008)Google Scholar
  12. 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)Google Scholar
  13. 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)Google Scholar
  14. 14.
    Papadimitriou C.H.: Computational Complexity. Addison-Wesley, New York (1994)MATHGoogle Scholar
  15. 15.
    Papadimitriou C.H., Steiglitz K.: Combinatorial Optimization: Algorithms and Complexity. Prentice-Hall, Englewood Cliffs (1982)MATHGoogle Scholar
  16. 16.
    Podelski, A., Rybalchenko, A.: Transition invariants. In: Ganzinger, H. (ed.) LICS’04: Logic in Computer Science, pp. 32–41. IEEE Computer Society (2004)Google Scholar
  17. 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. 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)MATHCrossRefMathSciNetGoogle Scholar
  19. 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)Google Scholar

Copyright information

© Springer-Verlag 2008

Authors and Affiliations

  1. 1.School of Computer ScienceTel-Aviv Academic CollegeJaffaIsrael

Personalised recommendations