Termination Analysis by Learning Terminating Programs

We present a novel approach to termination analysis. In a first step, the analysis uses a program as a black-box which exhibits only a finite set of sample traces. Each sample trace is infinite but can be represented by a finite lasso. The analysis can "learn" a program from a termination proof for the lasso, a program that is terminating by construction. In a second step, the analysis checks that the set of sample traces is representative in a sense that we can make formal. An experimental evaluation indicates that the approach is a potentially useful addition to the portfolio of existing approaches to termination analysis.

[1]  Jochen Hoenicke,et al.  SMTInterpol: An Interpolating SMT Solver , 2012, SPIN.

[2]  Gerard J. Holzmann,et al.  The Model Checker SPIN , 1997, IEEE Trans. Software Eng..

[3]  Ernst-Rüdiger Olderog,et al.  Verification of Sequential and Concurrent Programs , 1991, Texts and Monographs in Computer Science.

[4]  Alan J. Hu,et al.  Proving Termination by Divergence , 2007, Fifth IEEE International Conference on Software Engineering and Formal Methods (SEFM 2007).

[5]  Matthias Heizmann,et al.  Ranking Templates for Linear Loops , 2014, Log. Methods Comput. Sci..

[6]  Marc Brockschmidt,et al.  Better Termination Proving through Cooperation , 2013, CAV.

[7]  Yih-Kuen Tsay,et al.  GOAL for Games, Omega-Automata, and Logics , 2013, CAV.

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

[9]  Moshe Y. Vardi Verification of Concurrent Programs: The Automata-Theoretic Framework , 1991, Ann. Pure Appl. Log..

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

[11]  Yih-Kuen Tsay,et al.  State of Büchi Complementation , 2010, CIAA.

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

[13]  Florian Zuleger,et al.  Ramsey vs. Lexicographic Termination Proving , 2013, TACAS.

[14]  Kwangkeun Yi,et al.  Termination Analysis with Algorithmic Learning , 2012, CAV.

[15]  Jochen Hoenicke,et al.  Linear Ranking for Linear Lasso Programs , 2013, ATVA.

[16]  Moshe Y. Vardi,et al.  Büchi Complementation and Size-Change Termination , 2009, Log. Methods Comput. Sci..

[17]  Patrick Cousot,et al.  An abstract interpretation framework for termination , 2012, POPL '12.

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

[19]  Andrey Rybalchenko,et al.  Synthesizing software verifiers from proof rules , 2012, PLDI.

[20]  Andrey Rybalchenko,et al.  Compositional Termination Proofs for Multi-threaded Programs , 2012, TACAS.

[21]  Antoine Miné,et al.  An Abstract Domain to Infer Ordinal-Valued Ranking Functions , 2014, ESOP.

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

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

[24]  R. Alur,et al.  Adding nesting structure to words , 2006, JACM.

[25]  Sumit Gulwani,et al.  Control-flow refinement and progress invariants for bound analysis , 2009, PLDI '09.

[26]  Andreas Podelski,et al.  Proving program termination , 2011, Commun. ACM.

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

[28]  Jürgen Giesl,et al.  Automated Termination Proofs with AProVE , 2004, RTA.

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

[30]  Jochen Hoenicke,et al.  Nested interpolants , 2010, POPL '10.

[31]  Christof Löding,et al.  Improved Ramsey-Based Büchi Complementation , 2012, FoSSaCS.

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

[33]  Henny B. Sipma,et al.  Linear Ranking with Reachability , 2005, CAV.

[34]  Pierre Ganty,et al.  Proving Termination Starting from the End , 2013, CAV.

[35]  Daniel Kroening,et al.  Ranking function synthesis for bit-vector relations , 2010, Formal Methods Syst. Des..

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

[37]  Dirk Beyer,et al.  Status Report on Software Verification - (Competition Summary SV-COMP 2014) , 2014, TACAS.

[38]  Orna Kupferman,et al.  Büchi Complementation Made Tighter , 2006, Int. J. Found. Comput. Sci..

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