Handling Non-linear Operations in the Value Analysis of COSTA

Inferring precise relations between (the values of) program variables at different program points is essential for termination and resource usage analysis. In both cases, this information is used to synthesize ranking functions that imply the program?s termination and bound the number of iterations of its loops. For efficiency, it is common to base value analysis on non-disjunctive abstract domains such as Polyhedra, Octagon, etc. While these domains are efficient and able to infer complex relations for a wide class of programs, they are often not sufficient for modeling the effect of non-linear and bit arithmetic operations. Modeling such operations precisely can be done by using more sophisticated abstract domains, at the price of performance overhead. In this paper we report on the value analysis of COSTA that is based on the idea of encoding the disjunctive nature of non-linear operations into the (abstract) program itself, instead of using more sophisticated abstract domains. Our experiments demonstrate that COSTA is able to prove termination and infer bounds on resource consumption for programs that could not be handled before.

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

[2]  Michael Codish,et al.  Efficient Goal Directed Bottom-up Evaluation of Logic Programs , 1999, ICLP.

[3]  Robert W. Floyd,et al.  Assigning Meanings to Programs , 1993 .

[4]  Frank Yellin,et al.  The Java Virtual Machine Specification , 1996 .

[5]  Elvira Albert,et al.  Termination Analysis of Java Bytecode , 2008, FMOODS.

[6]  Sumit Gulwani,et al.  SPEED: precise and efficient static estimation of program computational complexity , 2009, POPL '09.

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

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

[9]  Saumya K. Debray,et al.  Global Flow Analysis as a Practical Compilation Tool , 1992, J. Log. Program..

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

[11]  Christian von Essen,et al.  Automated Termination Analysis of Java Bytecode by Term Rewriting , 2010, RTA.

[12]  Elvira Albert,et al.  Removing useless variables in cost analysis of Java bytecode , 2008, SAC '08.

[13]  Antoine Miné,et al.  The octagon abstract domain , 2001, High. Order Symb. Comput..

[14]  Laurie Hendren,et al.  Soot---a java optimization framework , 1999 .

[15]  Sriram Sankaranarayanan,et al.  Static Analysis in Disjunctive Numerical Domains , 2006, SAS.

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

[17]  Elvira Albert,et al.  Closed-Form Upper Bounds in Static Cost Analysis , 2011, Journal of Automated Reasoning.

[18]  Peter Müller,et al.  Formal Translation of Bytecode into BoogiePL , 2007, Electron. Notes Theor. Comput. Sci..

[19]  Andrew W. Appel,et al.  SSA is functional programming , 1998, SIGP.

[20]  Sumit Gulwani,et al.  The reachability-bound problem , 2010, PLDI '10.

[21]  Nicolas Halbwachs,et al.  Automatic discovery of linear restraints among variables of a program , 1978, POPL.

[22]  Jorge A. Navas,et al.  User-Definable Resource Usage Bounds Analysis for Java Bytecode , 2009, BYTECODE@ETAPS.

[23]  Antoine Mid The Octagon Abstract Domain , 2001 .

[24]  Roberto Bagnara,et al.  The Parma Polyhedra Library: Toward a complete set of numerical abstractions for the analysis and verification of hardware and software systems , 2006, Sci. Comput. Program..