Proving Mutual Termination of Programs

Speaker:
Dima Elenbogen, M.Sc. Thesis Seminar
Date:
Sunday, 27.10.2013, 10:30
Place:
Taub 601
Advisor:
Assoc. Prof. Ofer Strichman

Two programs are said to be mutually terminating if they terminate on exactly the same inputs. We suggest a proof rule for proving mutual termination of a given pair of functions f,f' and the respective subprograms that they call under a free context. Given a (possibly partial) mapping between the functions of the two programs, the premise of the rule requires proving that given the same arbitrary input in, f(in) and f'(in) call functions mapped in the mapping with the same arguments. A variant of this rule with a weaker premise allows to prove termination of one of the programs if the other is known to terminate for all inputs. In addition, we suggest various techniques for battling the inherent incompleteness of our solution, including a case in which the interface of the two functions is not identical, and a case in which there is partial information about the partial equivalence (the equivalence of their I/O behavior) of the two given functions. We present an algorithm for decomposing the verification problem of whole programs to that of proving mutual termination of individual functions, based on our suggested rules. The reported prototype implementation of this algorithm is the first to deal with the mutual termination problem.

Back to the index of events