Proving Termination of Tree Manipulating Programs

We consider the termination problem of programs manipulating treelike dynamic data structures. Our approach is based on a counter-example guided abstraction refinement loop. We use abstract regular tree model-checking to infer invariants of the program. Then, we translate the program to a counter automaton (CA) which simulates it. If the CA can be shown to terminate using existing techniques, the program terminates. If not, we analyse the possible counterexample given by a CA termination checker and either conclude that the program does not terminate, or else refine the abstraction and repeat. We show that the spuriousness problem for lasso-shaped counterexamples is decidable in some non-trivial cases. We applied the method successfully on several interesting case studies.

[1]  Ahmed Bouajjani,et al.  Abstract Regular Tree Model Checking of Complex Dynamic Data Structures , 2006, SAS.

[2]  Andreas Podelski,et al.  Terminator: Beyond Safety , 2006, CAV.

[3]  Reinhard Wilhelm,et al.  Parametric shape analysis via 3-valued logic , 1999, POPL '99.

[4]  Thomas W. Reps,et al.  Automated Verification of the Deutsch-Schorr-Waite Tree-Traversal Algorithm , 2006, SAS.

[5]  Edmund M. Clarke,et al.  Counterexample-Guided Abstraction Refinement , 2000, CAV.

[6]  Scott Henninger,et al.  Advances in Learning Software Organizations , 2002, Lecture Notes in Computer Science.

[7]  Amir Pnueli,et al.  Shape Analysis by Predicate Abstraction , 2005, VMCAI.

[8]  Eran Yahav,et al.  Verifying Temporal Heap Properties Specified via Evolution Logic , 2003, Log. J. IGPL.

[9]  Anders Møller,et al.  The Pointer Assertion Logic Engine , 2000 .

[10]  Sriram K. Rajamani,et al.  The SLAM Toolkit , 2001, CAV.

[11]  Parosh Aziz Abdulla,et al.  Proving Termination of Tree Manipulating Programs , 2007 .

[12]  Peter W. O'Hearn,et al.  Automatic Termination Proofs for Programs with Shape-Shifting Heaps , 2006, CAV.

[13]  Yassine Lakhnech,et al.  Flat Parametric Counter Automata , 2006, ICALP.

[14]  Thomas A. Henzinger,et al.  Software Verification with BLAST , 2003, SPIN.

[15]  Jyotirmoy V. Deshmukh,et al.  Automatic Verification of Parameterized Data Structures , 2006, TACAS.

[16]  Peter W. O'Hearn,et al.  Variance analyses from invariance analyses , 2007, POPL '07.

[17]  Gustaf Neumann,et al.  Coordination Technology for Collaborative Applications , 1996, Lecture Notes in Computer Science.

[18]  John C. Reynolds,et al.  Separation logic: a logic for shared mutable data structures , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

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

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

[21]  Hubert Comon-Lundh,et al.  Multiple Counters Automata, Safety Analysis and Presburger Arithmetic , 1998, CAV.

[22]  Alex Groce,et al.  Efficient Verification of Sequential and Concurrent C Programs , 2004, Formal Methods Syst. Des..

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

[24]  R. K. Shyamasundar,et al.  Introduction to algorithms , 1996 .