Metric Spaces and Termination Analyses

  • Aziem Chawdhary
  • Hongseok Yang
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6461)


We present a framework for defining abstract interpreters for liveness properties, in particular program termination. The framework makes use of the theory of metric spaces to define a concrete semantics, relates this semantics with the usual order-theoretic semantics of abstract interpretation, and identifies a set of conditions for determining when an abstract interpreter is sound for analysing liveness properties. Our soundness proof of the framework is based on a novel relationship between unique fixpoints in metric semantics and post-fixpoints computed by abstract interpreters. We illustrate the power of the framework by providing an instance that can automatically prove the termination of programs with general (not necessarily tail) recursion.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Balaban, I., Pnueli, A., Zuck, L.: Ranking abstraction as companion to predicate abstraction. In: Wang, F. (ed.) FORTE 2005. LNCS, vol. 3731, pp. 1–12. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  2. 2.
    Bradley, A., Manna, Z., Sipma, H.: Termination of polynomial programs. In: Cousot, R. (ed.) VMCAI 2005. LNCS, vol. 3385, pp. 113–129. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  3. 3.
    Bradley, A.R., Manna, Z., Sipma, H.B.: The polyranking principle. In: Caires, L., Italiano, G.F., Monteiro, L., Palamidessi, C., Yung, M. (eds.) ICALP 2005. LNCS, vol. 3580, pp. 1349–1361. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  4. 4.
    Chawdhary, A., Cook, B., Gulwani, S., Sagiv, M., Yang, H.: Ranking abstractions. In: Drossopoulou, S. (ed.) ESOP 2008. LNCS, vol. 4960, pp. 148–162. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  5. 5.
    Codish, M., Taboch, C.: A semantic basis for the termination analysis of logic programs. JLP 41(1), 103–123 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Cook, B., Gotsman, A., Podelski, A., Rybalchenko, A., Vardi, M.Y.: Proving that programs eventually do something good. In: POPL 2007 (2007)Google Scholar
  7. 7.
    Cook, B., Podelski, A., Rybalchenko, A.: Termination proofs for systems code. In: PLDI 2006 (2006)Google Scholar
  8. 8.
    Cook, B., Podelski, A., Rybalchenko, A.: Summarization for termination: no return! Formal Methods in System Design 35(3), 369–387 (2009)CrossRefzbMATHGoogle Scholar
  9. 9.
    Cousot, P.: Constructive design of a hierarchy of semantics of a transition system by abstract interpretation. Theor. Comput. Sci. 277(1-2), 47–103 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  10. 10.
    Cousot, P., Cousot, R.: Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Proceedings of the 4th ACM Symposium on Principles of Programming Languages, pp. 238–252 (January 1977)Google Scholar
  11. 11.
    Cousot, P., Cousot, R.: Abstract interpretation frameworks. Journal of Logic and Computation 2(4), 511–547 (1992)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Cousot, P., Cousot, R.: Bi-inductive structural semantics. Information and Computation 207(2), 258–283 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    de Bakker, J., de Vink, E.: Control flow semantics. MIT Press, Cambridge (1996)zbMATHGoogle Scholar
  14. 14.
    Escardó, M.: A metric model of PCF. unpublished research note (1998)Google Scholar
  15. 15.
    Jeannet, B., Serwe, W.: Abstracting call-stacks for interprocedural verification of imperative programs. In: Rattray, C., Maharaj, S., Shankland, C. (eds.) AMAST 2004. LNCS, vol. 3116, pp. 258–273. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  16. 16.
    Kroening, D., Sharygina, N., Tsitovich, A., Wintersteiger, C.: Termination analysis with compositional transition invariants. In: Touili, T., Cook, B., Jackson, P. (eds.) Computer Aided Verification. LNCS, vol. 6174, pp. 89–103. Springer, Heidelberg (to appear, 2010)CrossRefGoogle Scholar
  17. 17.
    Lee, C.S., Jones, N.D., Ben-Amram, A.M.: The size-change principle for program termination. SIGPLAN Not. 36(3), 81–92 (2001)CrossRefzbMATHGoogle Scholar
  18. 18.
    Podelski, A., Rybalchenko, A.: A complete method for the synthesis of linear ranking functions. In: Steffen, B., Levi, G. (eds.) VMCAI 2004. LNCS, vol. 2937, pp. 239–251. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  19. 19.
    Podelski, A., Rybalchenko, A.: Transition invariants. In: LICS 2004 (2004)Google Scholar
  20. 20.
    van Breugel, F.: An introduction to metric semantics: operational and denotational models for programming and specification languages. Theoretical Computer Science 258(1-2), 1–98 (2001)MathSciNetCrossRefzbMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Aziem Chawdhary
    • 1
    • 2
  • Hongseok Yang
    • 2
  1. 1.Durham UniversityUK
  2. 2.Queen Mary University of LondonUK

Personalised recommendations