Modular Termination Analysis of Java Bytecode and Its Application to phoneME Core Libraries

Termination analysis has received considerable attention, traditionally in the context of declarative programming and, recently, also for imperative and Object Oriented (OO) languages. In fact, there exist termination analyzers for OO which are capable of proving termination of medium size applications by means of global analysis, in the sense that all the code used by such applications has to be proved terminating. However, global analysis has important weaknesses, such as its high memory requirements and its lack of efficiency, since often some parts of the code have to be analyzed over and over again, libraries being a paramount example of this. In this work we present how to extend the termination analysis in the COSTA system in order to make it modular by allowing separate analysis of individual methods. The proposed approach has been implemented. We report on its application to the termination analysis of the core libraries of the phoneME project, a well-known open source implementation of Java Micro Edition (JavaME), a realistic but reduced version of Java to be run on mobile phones and PDAs. We argue that such experiments are relevant, since handling libraries is known to be one of the most relevant open problems in analysis and verification of real-life applications. Our experimental results show that our proposal dramatically reduces the amount of code which needs to be handled in each analysis and that this allows proving termination of a good number of methods for which global analysis is unfeasible.

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

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

[3]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

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

[5]  S. Genaim,et al.  The Acyclicity Inference of COSTA , 2010 .

[6]  Larry Wos,et al.  What Is Automated Reasoning? , 1987, J. Autom. Reason..

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

[8]  Wim Vanhoof,et al.  Binding-time analysis for Mercury , 2004 .

[9]  Elvira Albert,et al.  Cost Analysis of Java Bytecode , 2007, ESOP.

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

[11]  Elvira Albert,et al.  From Object Fields to Local Variables: A Practical Approach to Field-Sensitive Analysis , 2010, SAS.

[12]  Henny B. Sipma,et al.  Termination of Polynomial Programs , 2005, VMCAI.

[13]  Peter J. Stuckey,et al.  A Generic Framework for Context-Sensitive Analysis of Modular Programs , 2004, Program Development in Computational Logic.

[14]  Christian von Essen,et al.  Termination Graphs for Java Bytecode , 2010, Verification, Induction, Termination Analysis.

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

[16]  Marcello M. Bonsangue,et al.  Formal Methods for Components and Objects - 8th International Symposium, FMCO 2009, Eindhoven, The Netherlands, November 4-6, 2009. Revised Selected Papers , 2010, FMCO.

[17]  Christian W. Probst,et al.  Modular Control Flow Analysis for Libraries , 2002, SAS.

[18]  Manuel V. Hermenegildo,et al.  Experiments in Context-Sensitive Analysis of Modular Programs , 2005, LOPSTR.

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

[20]  Yehoshua Sagiv,et al.  Automatic Termination Analysis of Logic Programs , 1997, ICLP.

[21]  Roberto Giacobazzi,et al.  Compositional analysis of modular logic programs , 1993, POPL '93.

[22]  Patrick Cousot,et al.  Modular Static Program Analysis , 2002, CC.

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

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

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

[26]  Fausto Spoto,et al.  Class analyses as abstract interpretations of trace semantics , 2003, TOPL.

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

[28]  Thomas P. Jensen,et al.  Modular Class Analysis with DATALOG , 2003, SAS.

[29]  P. Cochat,et al.  Et al , 2008, Archives de pediatrie : organe officiel de la Societe francaise de pediatrie.

[30]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[31]  Elvira Albert,et al.  Resource Usage Analysis and Its Application to Resource Certification , 2009, FOSAD.

[32]  Francesco Logozzo Separate Compositional Analysis of Class-Based Object-Oriented Languages , 2004, AMAST.

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

[34]  Bertrand Meyer,et al.  Object-Oriented Software Construction, 2nd Edition , 1997 .