Abstract
We present two algorithms to prove termination of programs by synthesizing linear ranking functions. The first uses an invariant generator based on iterative forward propagation with widening and extracts ranking functions from the generated invariants by manipulating polyhedral cones. It is capable of finding subtle ranking functions which are linear combinations of many program variables, but is limited to programs with few variables.
The second, more heuristic, algorithm targets the class of structured programs with single-variable ranking functions. Its invariant generator uses a heuristic extrapolation operator to avoid iterative forward propagation over program loops. For the programs we have considered, this approach converges faster and the invariants it discovers are sufficiently strong to imply the existence of ranking functions.
This research was supported in part by NSF(ITR) grant CCR-01-21403, by NSF grant CCR-99-00984-001, by ARO grant DAAD19-01-1-0723, and by ARPA/AF contracts F33615-00-C-1693 and F33615-99-C-3014.
Chapter PDF
Similar content being viewed by others
Keywords
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.
References
Nikolaj S. Bjørner, Anca Browne, Michael Colón, Bernd Finkbeiner, Zohar Manna, Henny B. Sipma, and Tomás E. Uribe. Verifying temporal properties of reactive systems: A STeP tutorial. Formal Methods in System Design, 16(3):227–270, June 2000.
J. Brauburger and J. Giesl. Approximating the domains of functional and imperative programs. Science of Computer Programming, 35:113–136, 1999.
G. E. Collins. Quantifier elimination for real closed fields by cylindrical algebraic decomposition. In H. Brakhage, editor, Proc. Second GI Conf. Autamata Theory and Formal Languages, volume 33 of Lecture Notes in Computer Science, pages134–183, 1975.
Michael Colón and Henny Sipma. Synthesis of linear ranking functions. In Tiziana Margaria and Wang Yi, editors, 7th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS), volume 2031 of LNCS, pages 67–81. Springer Verlag, April 2001.
T. Cormen, C. Leiserson, and R. Rivest. Introduction to Algorithms. McGraw-Hill, New York, 1990.
Patrick Cousot and Rhadia Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In 4th ACM Symp. Princ. of Prog. Lang., pages 238–252. ACM Press, 1977.
Patrick Cousot and Nicholas Halbwachs. Automatic discovery of linear restraints among the variables of a program. In 5th ACM Symp. Princ. of Prog. Lang., pages84–97, January 1978.
Dennis Dams, Rob Gerth, and Orna Grumberg. A heuristic for the automatic generation of ranking functions. In Workshop on Advances in Verification (WAVe’00), pages 1–8, 2000.
N. Dershowitz. Termination of rewriting. Journal of Symbolic Computation, 3:69–116, 1987.
K. Fukuda and A. Prodon. Double description method revisited. In Combinatorics and Computer Science, volume 1120 of Lecture Notes in Computer Science, pages91–111. Springer-Verlag, 1996.
J. Giesl. Generating polynomial orderings for termination proofs. In J. Hsiang, editor, Proc. 6th Intl. Conf. Rewriting Techniques and Applications, volume 914 of Lecture Notes in Computer Science, pages 426–431. Springer-Verlag, 1995.
J. Giesl, C. Walther, and J. Brauburger. Termination analysis for functional programs. In W. Bibel and P. H. Schmitt, editors, Automated Deduction — A Basis for Applications, Volume III: Applications, chapter 6, pages 135–164. Kluwer Academic, 1998.
Zohar Manna. Mathematical Theory of Computation. McGraw-Hill, 1974.
Zohar Manna and Amir Pnueli. Temporal Verification of Reactive Systems: Safety. Springer-Verlag, New York, 1995.
D. de Schreye and S. Decorte. Termination of logic programs: The never ending story. Journal of Logic Programming, 19,20:199–260, 1994.
Niklaus Wirth. Algorithms + Data Structures = Programs. Prentice-Hall, 1976.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Colón, M.A., Sipma, H.B. (2002). Practical Methods for Proving Program Termination. In: Brinksma, E., Larsen, K.G. (eds) Computer Aided Verification. CAV 2002. Lecture Notes in Computer Science, vol 2404. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45657-0_36
Download citation
DOI: https://doi.org/10.1007/3-540-45657-0_36
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-43997-4
Online ISBN: 978-3-540-45657-5
eBook Packages: Springer Book Archive