Advertisement

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

  • D. Ramírez-Deantes
  • J. Correas
  • G. Puebla
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6921)

Abstract

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.

Keywords

Abstract Interpretation Abstract Domain Control Flow Graph Call Graph Object Orient 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Albert, E., Arenas, P., Codish, M., Genaim, S., Puebla, G., Zanardini, D.: Termination Analysis of Java Bytecode. In: Barthe, G., de Boer, F.S. (eds.) FMOODS 2008. LNCS, vol. 5051, pp. 2–18. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  2. 2.
    Albert, E., Arenas, P., Genaim, S., Puebla, G., Zanardini, D.: Cost analysis of java bytecode. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 157–172. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  3. 3.
    Albert, E., Arenas, P., Genaim, S., Puebla, G., Zanardini, D.: COSTA: Design and Implementation of a Cost and Termination Analyzer for Java Bytecode. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2007. LNCS, vol. 5382, pp. 113–132. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  4. 4.
    Albert, E., Arenas, P., Genaim, S., Puebla, G., Zanardini, D.: Resource Usage Analysis and its Application to Resource Certification. In: FOSAD 2007. LNCS, vol. 5705, pp. 258–288. Springer, Heidelberg (2009)Google Scholar
  5. 5.
    Albert, E., Arenas, P., Genaim, S., Puebla, G., Ramírez, D.: From Object Fields to Local Variables: A Practical Approach to Field-Sensitive Analysis. In: Cousot, R., Martel, M. (eds.) SAS 2010. LNCS, vol. 6337, pp. 100–116. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  6. 6.
    Besson, F., Jensen, T.: Modular class analysis with datalog. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 19–36. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  7. 7.
    Bradley, A.R., Manna, Z., Sipma, H.B.: Termination of polynomial programs. In: Cousot, R. (ed.) VMCAI 2005. LNCS, vol. 3385, pp. 113–129. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  8. 8.
    Codish, M., Debray, S.K., Giacobazzi, R.: Compositional analysis of modular logic programs. In: Proc. POPL 1993 (1993)Google Scholar
  9. 9.
    Codish, M., Taboch, C.: A semantic basis for the termination analysis of logic programs. J. Log. Program. 41(1), 103–123 (1999)CrossRefzbMATHMathSciNetGoogle Scholar
  10. 10.
    Cook, B., Podelski, A., Rybalchenko, A.: Termination proofs for systems code. In: PLDI (2006)Google Scholar
  11. 11.
    Correas, J., Puebla, G., Hermenegildo, M., Bueno, F.: Experiments in Context-Sensitive Analysis of Modular Programs. In: Hill, P.M. (ed.) LOPSTR 2005. LNCS, vol. 3901, pp. 163–178. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  12. 12.
    Cousot, P., Cousot, R.: Abstract Interpretation: a Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In: POPL 1977, pp. 238–252. ACM, New York (1977)Google Scholar
  13. 13.
    Cousot, P., Cousot, R.: Modular static program analysis. In: CC 2002. LNCS, vol. 2304, pp. 159–179. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  14. 14.
    Puebla, G., et al.: A Generic Framework for Context-Sensitive Analysis of Modular Programs. In: Bruynooghe, M., Lau, K. (eds.) Program Development in Computational Logic. LNCS, vol. 3049, pp. 233–260. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  15. 15.
    Genaim, S., Zanardini, D.: The acyclicity inference of COSTA. In: 11th International Workshop on Termination (July 2010)Google Scholar
  16. 16.
    Giesl, J., Schneider-Kamp, P., Thiemann, R.: AProVE 1.2: Automatic Termination Proofs in the Dependency Pair Framework. In: Furbach, U., Shankar, N. (eds.) IJCAR 2006. LNCS (LNAI), vol. 4130, pp. 281–286. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  17. 17.
    Lee, C.S., Jones, N.D., Ben-Amram, A.M.: The size-change principle for program termination. In: POPL 2001, pp. 81–92. ACM, New York (2001)Google Scholar
  18. 18.
    Lindenstrauss, N., Sagiv, Y.: Automatic termination analysis of logic programs. In: ICLP (1997)Google Scholar
  19. 19.
    Logozzo, F.: Separate Compositional Analysis of Class-based Object-oriented Languages. In: Rattray, C., Maharaj, S., Shankland, C. (eds.) AMAST 2004. LNCS, vol. 3116, pp. 334–348. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  20. 20.
    Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice-Hall, Inc., Upper Saddle River (1997)zbMATHGoogle Scholar
  21. 21.
    Otto, C., Brockschmidt, M., von Essen, C., Giesl, J.: Termination Analysis of Java Bytecode by Term Rewriting. In: Waldmann, J. (ed.) WST 2009, Leipzig, Germany (June 2009)Google Scholar
  22. 22.
    Probst, C.W.: Modular Control Flow Analysis for Libraries. In: Hermenegildo, M.V., Puebla, G. (eds.) SAS 2002. LNCS, vol. 2477, pp. 165–179. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  23. 23.
    Spoto, F., Hill, P.M., Payet, E.: Path-length analysis of object-oriented programs. In: EAAI 2006. ENTCS. Elsevier, Amsterdam (2006)Google Scholar
  24. 24.
    Spoto, F., Jensen, T.: Class analyses as abstract interpretations of trace semantics. ACM Trans. Program. Lang. Syst. 25(5), 578–630 (2003)CrossRefGoogle Scholar
  25. 25.
    Spoto, F., Mesnard, F., Payet, É.: A Termination Analyser for Java Bytecode based on Path-Length. ACM TOPLAS 32(3) (2010)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • D. Ramírez-Deantes
    • 1
  • J. Correas
    • 2
  • G. Puebla
    • 1
  1. 1.DLSIISTechnical University of Madrid (UPM)Spain
  2. 2.DSICComplutense University of Madrid (UCM)Spain

Personalised recommendations