ACM Home Page
Please provide us with feedback. Feedback
Size-change termination with difference constraints
Full text PdfPdf (249 KB)
Source
ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 30 ,  Issue 3  (May 2008) table of contents
Article No. 16  
Year of Publication: 2008
ISSN:0164-0925
Author
Amir M. Ben-Amram  The Academic College Tel-Aviv Yaffo, Tel Aviv, Israel
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 8,   Downloads (12 Months): 80,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1353445.1353450
What is a DOI?

ABSTRACT

This article considers an algorithmic problem related to the termination analysis of programs. More specifically, we are given bounds on differences in sizes of data values before and after every transition in the program's control-flow graph. Our goal is to infer program termination via the following reasoning (“the size-change principle”): if in any infinite (hypothetic) execution of the program, some size must descend unboundedly, the program must always terminate, since infinite descent of a natural number is impossible.

The problem of inferring termination from such abstract information is not the halting problem for programs and may well be decidable. If this is the case, the decision algorithm forms a “back end” of a termination verifier, and it is interesting to find out the computational complexity of the problem.

A restriction of the problem described above, which only uses monotonicity information (but not difference bounds), is already known to be decidable. We prove that the unrestricted problem is undecidable, which gives a theoretical argument for studying restricted cases. We consider a case where the termination proof is allowed to make use of at most one bound per target variable in each transition. For this special case, which we claim is practically significant, we give (for the first time) an algorithm and show that the problem is in PSPACE, in fact that it is PSPACE-complete. The algorithm is based on combinatorial arguments and results from the theory of integer programming not previously used for similar problems.

The algorithm has interesting connections to other work in termination, in particular to methods for generating linear ranking functions or invariants.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
Anderson, H. and Khoo, S.-C. 2003. Affine-based size-change termination. In Proceedings of the First Asian Symposium on Programming Languages and Systems (APLAS 2003) (Beijing, China), A. Ohori, Ed. Lecture Notes in Computer Science, vol. 2895. Springer-Verlag, New York, 122--140.
 
2
 
3
Avery, J. 2006. Size-change termination and bound analysis. In Proceedings of the 8th International Symposium on Functional and Logic Programming (FLOPS 2006) M. Hagiya and P. Wadler, Eds. Lecture Notes in Computer Science, vol. 3945. Springer-Verlag, New York.
4
5
 
6
 
7
Codish, M., Lagoon, V., and Stuckey, P. J. 2005. Testing for termination with monotonicity constraints. In Logic Programming, 21st International Conference, ICLP 2005, M. Gabbrielli and G. Gupta, Eds. Lecture Notes in Computer Science, vol. 3668. Springer-Verlag, New York, 326--340.
 
8
 
9
 
10
Cook, B., Podelski, A., and Rybalchenko, A. 2005. Abstraction refinement for termination. In Proceedings of the 12th International Symposium on Static Analysis (SAS'05) (London, UK, Sept. 7--9) Lecture Notes in Computer Science, vol. 3672. Springer-Verlag, New York, 87--101.
 
11
Cook, B., Podelski, A., and Rybalchenko, A. 2006. Terminator: Beyond safety. In Proceedings of the 18th International Conference on Computer Aided Verification (CAV 2006), (Seattle, WA, Aug.), T. Ball and R. B. Jones, Eds. Lecture Notes in Computer Science, vol. 4144. Springer-Verlag, New York, 415--418.
 
12
Dershowitz, N., Lindenstrauss, N., Sagiv, Y., and Serebrenik, A. 2001. A general framework for automatic termination analysis of logic programs. Applic. Algebra Eng. Commun. Comput. 12, 1--2, 117--156.
 
13
 
14
Graham, R. L. 1981. Rudiments of Ramsey Theory. American Mathematical Society.
 
15
Jones, N. D. 1988. Automatic program specialization: A re-examination from basic principles. In Partial Evaluation and Mixed Computation, D. Bjørner, A. P. Ershov, and N. D. Jones, Eds. North-Holland, Amsterdam, The Netherlands, 225--282.
 
16
 
17
Jones, N. D. and Bohr, N. 2004. 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. Springer-Verlag, New York, 1--23.
 
18
 
19
Jones, N. D., Landweber, L. H., and Lien, Y. E. 1977. Complexity of some problems in Petri nets. Theoret. Comput. Sci. 4, 3 (June), 277--299.
 
20
Lee, C. S. 2002. Program termination analysis and termination of offline partial evaluation. Ph.D. dissertation, University of Western Australia.
 
21
Lee, C. S. 2008. Ranking functions for size-change termination. Submitted for publication in ACM Trans. Prog. Lang. Syst. (Levven, Belgium).
22
 
23
Lindenstrauss, N. and Sagiv, Y. 1997a. Automatic termination analysis of logic programs (with detailed experimental results). http://www.cs.huji.ac.il/~naomil/.
 
24
Lindenstrauss, N. and Sagiv, Y. 1997b. Automatic termination analysis of Prolog programs. In Proceedings of the 14th International Conference on Logic Programming (Leuven, Belgium). L. Naish, Ed. MIT Press, Cambridge, MA, 64--77.
 
25
Manolios, P. and Vroon, D. 2006. Termination analysis with calling context graphs. In Proceedings of the 18th International Conference on Computer Aided Verification (CAV 2006) (Seattle, WA Aug.). Lecture Notes in Computer Science, vol. 4144. Springer-Verlag, New York, 401--414.
 
26
27
 
28
 
29
 
30
Ramsey, F. P. 1930. On a problem of formal logic. In Proceedings of the London Mathematical Society. The London Mathematical Society, London, UK, 264--286.
 
31
Sagiv, Y. 1991. A termination test for logic programs. In Proceedings of the International Symposium on Logic Programming (San Diego, CA). V. Saraswat and K. Ueda, Eds. MIT Press, Cambridge, MA, 518--532.
 
32
Schreye, D. D. and Decorte, S. 1994. Termination of logic programs: The never-ending story. J. Logic Prog. 19-20, 199--260.
33
 
34
35