A Specification Logic for Termination Reasoning

We propose a logical framework for specifying and proving as sertions about program termination. Although termination of p rograms has been well studied, it is usually added as an external component to the specification logic. Here we propose to integrate termination requiremen ts directly into our specification logic, astemporal constraintsfor each phase of every method. Our temporal constraints can specify a strict decrease in a boun ded measure for termination proofs and the unreachability of method exit for nontermination proofs. Furthermore, our termination-infused logic can leverage r icher specification logics to help conduct more complex termination reasoning for p r grams with structural specification, heap manipulation, exception handlin g, and multiple phases. We expect our termination reasoning to directly benefit from any future improvements to our specification mechanism because it is fully inte grat d into our specification logic. Through an experimental evaluation, we rep ort on the usability and practicality of a verification system, based on separati on logic, that has been enhanced with our termination constraints.

[1]  William Pugh,et al.  The Omega test: A fast and practical integer programming algorithm for dependence analysis , 1991, Proceedings of the 1991 ACM/IEEE Conference on Supercomputing (Supercomputing '91).

[2]  Virgile Prevosto,et al.  Functional dependencies of C functions via weakest pre-conditions , 2011, International Journal on Software Tools for Technology Transfer.

[3]  Jürgen Giesl,et al.  Automatic Termination Proofs in the Dependency Pair Framework , 2006, IJCAR.

[4]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

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

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

[7]  Philipp Rümmer,et al.  Non-termination Checking for Imperative Programs , 2008, TAP.

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

[9]  Aquinas Hobor,et al.  A Theory of Termination via Indirection , 2010, Modelling, Controlling and Reasoning About State.

[10]  Shengchao Qin,et al.  Structured Specifications for Better Verification of Heap-Manipulating Programs , 2011, FM.

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

[12]  William R. Harris,et al.  Alternation for Termination , 2010, SAS.

[13]  Amir Pnueli,et al.  Algorithmic Verification of Linear Temporal Logic Specifications , 1998, ICALP.

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

[15]  J. Filliâtre,et al.  ACSL: ANSI/ISO C Specification Language , 2008 .

[16]  Nils Klarlund,et al.  MONA Version 1.4 - User Manual , 2001 .

[17]  Thomas Sturm,et al.  REDLOG: computer algebra meets computer logic , 1997, SIGS.

[18]  Bernhard Beckert,et al.  The KeY tool , 2005, Software & Systems Modeling.

[19]  Shengchao Qin,et al.  Automated Verification of Shape and Size , 2007 .

[20]  Deepak Kapur,et al.  A Term Rewriting Approach to the Automated Termination Analysis of Imperative Programs , 2009, CADE.

[21]  James Brotherston,et al.  Cyclic proofs of program termination in separation logic , 2008, POPL '08.

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

[23]  Cristina David,et al.  A Specification Logic for Exceptions and Beyond , 2010, ATVA.

[24]  Andrew W. Appel,et al.  Separation Logic for Small-Step cminor , 2007, TPHOLs.

[25]  Thomas A. Henzinger,et al.  Proving non-termination , 2008, POPL '08.

[26]  Andreas Podelski,et al.  Transition predicate abstraction and fair termination , 2005, POPL '05.

[27]  Wei-Ngan Chin,et al.  Dual analysis for proving safety and finding bugs , 2010, SAC '10.

[28]  Henny B. Sipma,et al.  Visual Abstractions for Temporal Verification , 1999, AMAST.

[29]  Wei-Ngan Chin,et al.  Immutable specifications for more concise and precise verification , 2011, OOPSLA '11.

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

[31]  K. Rustan M. Leino,et al.  Dafny: An Automatic Program Verifier for Functional Correctness , 2010, LPAR.