Field-Sensitive Value Analysis by Field-Insensitive Analysis

Shared and mutable data-structures pose major problems in static analysis and most analyzers are unable to keep track of the values of numeric variables stored in the heap. In this paper, we first identify sufficient conditions under which heap allocated numeric variables in object oriented programs (i.e., numeric fields) can be handled as non-heap allocated variables. Then, we present a static analysis to infer which numeric fields satisfy these conditions at the level of (sequential) bytecode . This allows instrumenting the code with ghost variables which make such numeric fields observable to any field-insensitive value analysis. Our experimental results in termination analysis show that we greatly enlarge the class of analyzable programs with a reasonable overhead.

[1]  Alex K. Simpson,et al.  Computational Adequacy in an Elementary Topos , 1998, CSL.

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

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

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

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

[6]  Bor-Yuh Evan Chang,et al.  Abstract Interpretation with Alien Expressions and Heap Structures , 2005, VMCAI.

[7]  Alain Deutsch,et al.  Interprocedural may-alias analysis for pointers: beyond k-limiting , 1994, PLDI '94.

[8]  Michael Codish,et al.  A Semantic Basis for the Termination Analysis of Logic Programs , 1999, J. Log. Program..

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

[10]  Jan Vitek,et al.  ECOOP 2008 - Object-Oriented Programming, 22nd European Conference, Paphos, Cyprus, July 7-11, 2008, Proceedings , 2008, ECOOP.

[11]  Anindya Banerjee,et al.  Regional Logic for Local Reasoning about Global Invariants , 2008, ECOOP.

[12]  Étienne Payet,et al.  Path-Length Analysis for Object-Oriented Programs , 2006 .

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

[14]  Francesco Logozzo Cibai: An Abstract Interpretation-Based Static Analyzer for Modular Analysis and Verification of Java Classes , 2007, VMCAI.

[15]  Kousha Etessami,et al.  Analysis of Recursive Game Graphs Using Data Flow Equations , 2004, VMCAI.

[16]  Peter W. O'Hearn,et al.  Local Reasoning about Programs that Alter Data Structures , 2001, CSL.

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

[18]  Alexander Aiken,et al.  Checking and inferring local non-aliasing , 2003, PLDI '03.

[19]  Flemming Nielson,et al.  Principles of Program Analysis , 1999, Springer Berlin Heidelberg.

[20]  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.