sign in
english version rss feed

inria-00434037, version 1

Program Termination and Worst Time Complexity with Multi-Dimensional Affine Ranking Functions

Christophe Alias () a1, Alain Darte () b1, Paul Feautrier () c1, Laure Gonnord () 1, Clément Quinson 1

(2009)

Abstract: A standard method for proving the termination of a flowchart program is to exhibit a ranking function, i.e., a function from the program states to a well-founded set, which strictly decreases at each program step. Our main contribution is to give an efficient algorithm for the automatic generation of multi-dimensional affine nonnegative ranking functions, a restricted class of ranking functions that can be handled with linear programming techniques. Our algorithm is based on the combination of the generation of invariants (a technique from abstract interpretation) and on an adaptation of multi-dimensional affine scheduling (a technique from automatic parallelization). We also prove the completeness of our technique with respect to its input and the class of rankings we consider. Finally, as a byproduct, by computing the cardinal of the range of the ranking function, we obtain an upper bound for the computational complexity of the source program, which does not depend on restrictions on the shape of loops or on program structure. This estimate is a polynomial, which means that we can handle programs with more than linear complexity. The method is tested on a large collection of test cases from the literature. We also point out future improvements to handle larger programs.

  • Domain : Computer Science/Embedded Systems
  • Keywords : static analysis – termination proof – multidimensional affine ranking functions – worst-case time complexity estimation
 
  • inria-00434037, version 1
  • oai:hal.inria.fr:inria-00434037
  • From: 
  • Submitted on: Friday, 20 November 2009 15:43:54
  • Updated on: Tuesday, 1 December 2009 14:19:58
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...
all articles on CCSd database...