Skip to main content

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

  • Conference paper
  • 363 Accesses

Part of the book series: Lecture Notes in Computer Science ((LNPSE,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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  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. 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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  8. Codish, M., Debray, S.K., Giacobazzi, R.: Compositional analysis of modular logic programs. In: Proc. POPL 1993 (1993)

    Google Scholar 

  9. Codish, M., Taboch, C.: A semantic basis for the termination analysis of logic programs. J. Log. Program. 41(1), 103–123 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  10. Cook, B., Podelski, A., Rybalchenko, A.: Termination proofs for systems code. In: PLDI (2006)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  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. Cousot, P., Cousot, R.: Modular static program analysis. In: CC 2002. LNCS, vol. 2304, pp. 159–179. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  15. Genaim, S., Zanardini, D.: The acyclicity inference of COSTA. In: 11th International Workshop on Termination (July 2010)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  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. Lindenstrauss, N., Sagiv, Y.: Automatic termination analysis of logic programs. In: ICLP (1997)

    Google Scholar 

  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)

    Chapter  Google Scholar 

  20. Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice-Hall, Inc., Upper Saddle River (1997)

    MATH  Google Scholar 

  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. 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)

    Chapter  Google Scholar 

  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. Spoto, F., Jensen, T.: Class analyses as abstract interpretations of trace semantics. ACM Trans. Program. Lang. Syst. 25(5), 578–630 (2003)

    Article  Google Scholar 

  25. Spoto, F., Mesnard, F., Payet, É.: A Termination Analyser for Java Bytecode based on Path-Length. ACM TOPLAS 32(3) (2010)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Ramírez-Deantes, D., Correas, J., Puebla, G. (2012). Modular Termination Analysis of Java Bytecode and Its Application to phoneME Core Libraries. In: Barbosa, L.S., Lumpe, M. (eds) Formal Aspects of Component Software. FACS 2010. Lecture Notes in Computer Science, vol 6921. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-27269-1_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-27269-1_13

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-27268-4

  • Online ISBN: 978-3-642-27269-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics