Proving Termination of Programs with Bitvector Arithmetic by Symbolic Execution

In earlier work, we developed an approach for automated termination analysis of C programs with explicit pointer arithmetic, which is based on symbolic execution. However, similar to many other termination techniques, this approach assumed the program variables to range over mathematical integers instead of bitvectors. This eases mathematical reasoning but is unsound in general. In this paper, we extend our approach in order to handle fixed-width bitvector integers. Thus, we present the first technique for termination analysis of C programs that covers both byte-accurate pointer arithmetic and bit-precise modeling of integers. We implemented our approach in the automated termination prover AProVE and evaluate its power by extensive experiments.

[1]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[2]  Daniel Kroening,et al.  Synthesising Interprocedural Bit-Precise Termination Proofs , 2015 .

[3]  L. D. Moura,et al.  The YICES SMT Solver , 2006 .

[4]  Jürgen Giesl,et al.  Proving Termination and Memory Safety for Programs with Pointer Arithmetic , 2014, IJCAR.

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

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

[7]  Jürgen Giesl,et al.  Proving Termination of Programs Automatically with AProVE , 2014, IJCAR.

[8]  Vikram S. Adve,et al.  LLVM: a compilation framework for lifelong program analysis & transformation , 2004, International Symposium on Code Generation and Optimization, 2004. CGO 2004..

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

[10]  Deepak Kapur,et al.  Termination Analysis of C Programs Using Compiler Intermediate Languages , 2011, RTA.

[11]  Deepak Kapur,et al.  Termination Analysis of Imperative Programs Using Bitvector Arithmetic , 2012, VSTTE.

[12]  Daniel Kroening,et al.  Unrestricted Termination and Non-termination Arguments for Bit-Vector Programs , 2014, ESOP.

[13]  Daniel Kroening,et al.  Synthesising Interprocedural Bit-Precise Termination Proofs (T) , 2015, 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[14]  Jürgen Giesl,et al.  Automatically Proving Termination and Memory Safety for Programs with Pointer Arithmetic , 2014, Journal of Automated Reasoning.