Affiliation:
1. The Academic College Tel-Aviv Yaffo, Tel Aviv, Israel
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.
Publisher
Association for Computing Machinery (ACM)
Reference35 articles.
1. Apt K. R. and Pedreschi D. 1994. Modular termination proofs for logic and pure prolog programs. In Advances in Logic Programming Theory. Oxford University Press Oxford UK 183--229. Apt K. R. and Pedreschi D. 1994. Modular termination proofs for logic and pure prolog programs. In Advances in Logic Programming Theory. Oxford University Press Oxford UK 183--229.
2. Size-Change Termination and Bound Analysis
3. Program termination analysis in polynomial time
4. Inference of inequality constraints in logic programs (extended abstracts)
Cited by
18 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Runtime Complexity Bounds Using Squeezers;ACM Transactions on Programming Languages and Systems;2022-07-15
2. Run-time Complexity Bounds Using Squeezers;Programming Languages and Systems;2021
3. Complexity and Resource Bound Analysis of Imperative Programs Using Difference Constraints;Journal of Automated Reasoning;2017-01-11
4. Automata and Program Analysis;Fundamentals of Computation Theory;2017
5. Compositional Coinduction with Sized Types;Coalgebraic Methods in Computer Science;2016