A Complete Method for the Synthesis of Linear Ranking Functions

  • Andreas Podelski
  • Andrey Rybalchenko
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2937)

Abstract

We present an automated method for proving the termination of an unnested program loop by synthesizing linear ranking functions. The method is complete. Namely, if a linear ranking function exists then it will be discovered by our method. The method relies on the fact that we can obtain the linear ranking functions of the program loop as the solutions of a system of linear inequalities that we derive from the program loop. The method is used as a subroutine in a method for proving termination and other liveness properties of more general programs via transition invariants; see [PR03].

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [BBM97]
    Bjørner, N., Browne, A., Manna, Z.: Automatic generation of invariants and intermediate assertions. Theoretical Computer Science 173(1), 49–87 (1997)CrossRefMathSciNetGoogle Scholar
  2. [BS99]
    Burkart, O., Steffen, B.: Model checking the full modal mucalculus for infinite sequential processes. Theoretical Computer Science 221, 251–270 (1999)MATHCrossRefMathSciNetGoogle Scholar
  3. [CH78]
    Cousot, P., Halbwachs, N.: Automatic discovery of linear restraints among variables of a program. In: Proc. of POPL 1978: Symp. on Principles of Programming Languages, pp. 84–97. ACM Press, New York (1978)Google Scholar
  4. [CS01]
    Colon, M., Sipma, H.: Synthesis of linear ranking functions. In: Margaria, T., Yi, W. (eds.) TACAS 2001. LNCS, vol. 2031, pp. 67–81. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  5. [CS02]
    Colon, M., Sipma, H.: Practical methods for proving program termination. In: Brinksma, E., Larsen, K.G. (eds.) CAV 2002. LNCS, vol. 2404, pp. 442–454. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  6. [DGG00]
    Dams, D., Gerth, R., Grumberg, O.: A heuristic for the automatic generation of ranking functions. In: Workshop on Advances in Verification (WAVe 2000), pp. 1–8 (2000)Google Scholar
  7. [Dij76]
    Dijkstra, E.W.: A Discipline of Programming. Prentice Hall Series in Automatic Computation. Prentice Hall, Englewood Cliffs (1976)MATHGoogle Scholar
  8. [GCGL02]
    Genaim, S., Codish, M., Gallagher, J.P., Lagoon, V.: Combining norms to prove termination. In: Cortesi, A. (ed.) VMCAI 2002. LNCS, vol. 2294, pp. 126–138. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  9. [GVL96]
    Golub, G.H., Van Loan, C.F.: Matrix Computations, 3rd edn. Johns Hopkins Univ. Press, Baltimore (1996)MATHGoogle Scholar
  10. [Hol95]
    Holzbaur, C.: OFAI clp(q,r) Manual, Edition 1.3.3. Austrian Research Institute for Artificial Intelligence, Vienna, TR-95-09 (1995)Google Scholar
  11. [Kar76]
    Karr, M.: Affine relationships among variables of a program. Acta Informatica 6, 133–151 (1976)MATHCrossRefMathSciNetGoogle Scholar
  12. [Lab01]
    The Intelligent Systems Laboratory. SICStus Prolog User’s Manual. Swedish Institute of Computer Science, PO Box 1263 SE-164 29 Kista, Sweden. Release 3.8.7 (October 2001) Google Scholar
  13. [Mes96]
    Mesnard, F.: Inferring left-terminating classes of queries for constraint logic programs. In: Maher, M.J. (ed.) Proc. of JICSLP 1996: Joint Int. Conf. and Symp. on Logic Programming, pp. 7–21. MIT Press, Cambridge (1996)Google Scholar
  14. [MN01]
    Mesnard, F., Neumerkel, U.: Applying static analysis techniques for inferring termination conditions of logic programs. In: Cousot, P. (ed.) SAS 2001. LNCS, vol. 2126, pp. 93–110. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  15. [PR03]
    Podelski, A., Rybalchenko, A.: Software model checking of liveness properties via transition invariants. Technical report, Max-Plank-Institut für Informatik (2003)Google Scholar
  16. [PTVF92]
    Press, W.H., Teukolsky, S.A., Vetterling, W.T., Flannery, B.P.: Numerical Recipes in C: The Art of Scientific Computing. Cambridge University Press, Cambridge (1992)Google Scholar
  17. [Sch86]
    Schrijver, A.: Theory of Linear and Integer Programming. John Wiley & Sons Ltd., Chichester (1986)MATHGoogle Scholar
  18. [SG91]
    Sohn, K., Van Gelder, A.: Termination detection in logic programs using argument sizes. In: Proc. of PODS 1991: Symp. on Principles of Database Systems, pp. 216–226. ACM Press, New York (1991)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2004

Authors and Affiliations

  • Andreas Podelski
    • 1
  • Andrey Rybalchenko
    • 1
  1. 1.Max-Planck-Institut für InformatikSaarbrückenGermany

Personalised recommendations