Proving Termination Starting from the End

We present a novel technique for proving program termination which introduces a new dimension of modularity. Existing techniques use the program to incrementally construct a termination proof. While the proof keeps changing, the program remains the same. Our technique goes a step further. We show how to use the current partial proof to partition the transition relation into those behaviors known to be terminating from the current proof, and those whose status (terminating or not) is not known yet. This partition enables a new and unexplored dimension of incremental reasoning on the program side. In addition, we show that our approach naturally applies to conditional termination which searches for a precondition ensuring termination. We further report on a prototype implementation that advances the state-of-the-art on the grounds of termination and conditional termination.

[1]  Frank Plumpton Ramsey,et al.  On a Problem of Formal Logic , 1930 .

[2]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[3]  Patrick Cousot,et al.  Méthodes itératives de construction et d'approximation de points fixes d'opérateurs monotones sur un treillis, analyse sémantique des programmes , 1978 .

[4]  P. Cousot Thesis: These d'Etat es sciences mathematiques: Methodes iteratives de construction et d'approximation de points fixes d'operateurs monotones sur un treillis, analyse semantique de programmes (in French) , 1978 .

[5]  Robin Milner,et al.  On Observing Nondeterminism and Concurrency , 1980, ICALP.

[6]  Brian A. Davey,et al.  An Introduction to Lattices and Order , 1989 .

[7]  V. Rich Personal communication , 1989, Nature.

[8]  Hassen Saïdi,et al.  Construction of Abstract State Graphs with PVS , 1997, CAV.

[9]  Michael Codish,et al.  A Semantic Basis for the Termination Analysis of Logic Programs , 1999, J. Log. Program..

[10]  Patrick Cousot,et al.  Partial Completeness of Abstract Fixpoint Checking , 2000, SARA.

[11]  P. Cousot Partial Completeness of Abstract Fixpoint Checking (Invited paper) , 2000 .

[12]  Nachum Dershowitz,et al.  A General Framework for Automatic Termination Analysis of Logic Programs , 2000, Applicable Algebra in Engineering, Communication and Computing.

[13]  Neil D. Jones,et al.  The size-change principle for program termination , 2001, POPL '01.

[14]  Frank D. Valencia,et al.  Formal Methods for Components and Objects , 2002, Lecture Notes in Computer Science.

[15]  Andreas Podelski,et al.  Transition invariants , 2004, Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science, 2004..

[16]  Andreas Podelski,et al.  A Complete Method for the Synthesis of Linear Ranking Functions , 2004, VMCAI.

[17]  Kousha Etessami,et al.  Analysis of Recursive Game Graphs Using Data Flow Equations , 2004, VMCAI.

[18]  Rajeev Alur,et al.  A Temporal Logic of Nested Calls and Returns , 2004, TACAS.

[19]  Andreas Podelski,et al.  Abstraction Refinement for Termination , 2005, SAS.

[20]  Xavier Rival,et al.  Trace Partitioning in Abstract Interpretation Based Static Analyzers , 2005, ESOP.

[21]  Henny B. Sipma,et al.  The Polyranking Principle , 2005, ICALP.

[22]  Andreas Podelski,et al.  Termination proofs for systems code , 2006, PLDI '06.

[23]  Elvira Albert,et al.  COSTA: Design and Implementation of a Cost and Termination Analyzer for Java Bytecode , 2008, FMCO.

[24]  J. Raskin,et al.  The Fixpoint checking problem: an abstraction refinement perspective , 2007 .

[25]  Andreas Podelski,et al.  Heap Assumptions on Demand , 2008, CAV.

[26]  Sumit Gulwani,et al.  Proving Conditional Termination , 2008, CAV.

[27]  Lorenza Saitta,et al.  Abstraction, Reformulation and Approximation , 2008 .

[28]  Amir M. Ben-Amram Size-Change Termination, Monotonicity Constraints and Ranking Functions , 2009, CAV.

[29]  Daniel Kroening,et al.  Termination Analysis with Compositional Transition Invariants , 2010, CAV.

[30]  Étienne Payet,et al.  A termination analyzer for Java bytecode based on path-length , 2010, TOPL.

[31]  Andreas Podelski,et al.  Size-Change Termination and Transition Invariants , 2010, SAS.

[32]  Paul Feautrier,et al.  Multi-dimensional Rankings, Program Termination, and Complexity Bounds of Flowchart Programs , 2010, SAS.

[33]  Samir Genaim,et al.  On the linear ranking problem for integer linear-constraint loops , 2012, POPL.

[34]  Supratik Mukhopadhyay,et al.  Termination proofs for linear simple loops , 2013, International Journal on Software Tools for Technology Transfer.

[35]  Marius Bozga,et al.  Deciding Conditional Termination , 2012, TACAS.