Skip to main content

A Formal Design of a Tool for Static Analysis of Upper Bounds on Object Calls in Java

  • Conference paper
Formal Methods for Industrial Critical Systems (FMICS 2012)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7437))

Abstract

This paper presents a formal design of a tool for statically establishing the upper bound on the number of executions of objects’ methods in a fragment of object-oriented code. The algorithm that our tool employs is a multi-pass interprocedural analysis consisting of data flow and region-based analyses. We describe the formalization of each of stage of the algorithm. This rigorous specification greatly aids the implementation of the tool by removing ambiguities of textual descriptions. There are many applications for information obtained through this method including reasoning about concurrent code, scheduling, code optimization, compositing services, etc. We concentrate on using upper bounds to instrument transactional code that uses a synchronization mechanism based on versioning, and therefore benefits from a priori knowledge about the usage of shared objects within each transaction. To this end we implement a precompiler for Java that analyzes transactions, and injects generated source code to initialize each transaction.

This work has been partially supported by the Polish Ministry of Science and Higher Education within the European Regional Development Fund, Grant No. POIG.01.03.01-00-008/08.

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

Access this chapter

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aho, A.V., Lam, M.S., Sethi, R., Ullman, J.D.: Compilers: principles, techniques, and tools, 2nd edn. Addison Wesley (August 2006)

    Google Scholar 

  2. Cunningham, D., Gudka, K., Savani, R.: Keep Off the Grass: Locking the Right Path for Atomicity. In: Hendren, L. (ed.) CC 2008. LNCS, vol. 4959, pp. 276–290. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  3. Ermedahl, A., Sandberg, C., Gustafsson, J., Bygde, S., Lisper, B.: Loop bound analysis based on a combination of program slicing, abstract interpretation, and invariant analysis. In: Proc. of the 7th Workshop on WCET Analysis (July 2007)

    Google Scholar 

  4. Ferdinand, C., Heckmann, R.: AiT: Worst-case Execution Time Prediction by Static Program Analysis. In: WCC 2004. IFIP, vol. 156, pp. 377–383. Springer, Heidelberg (2004)

    Google Scholar 

  5. Ferdinand, C., Heckmann, R., Langenbach, M., Martin, F., Schmidt, M., Theiling, H., Thesing, S., Wilhelm, R.: Reliable and Precise WCET Determination for a Real-Life Processor. In: Henzinger, T.A., Kirsch, C.M. (eds.) EMSOFT 2001. LNCS, vol. 2211, p. 469. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  6. Gagnon, É.M., Hendren, L.J.: SableCC, an object-oriented compiler framework. In: Proc. of TOOLS 1998 (August 1998)

    Google Scholar 

  7. Gustafsson, J., Ermedahl, A., Lisper, B.: Towards a flow analysis for embedded system C programs. In: Proc. of WORDS 2005 (September 2005)

    Google Scholar 

  8. Harmon, T., Schoeberl, M., Kirner, R., Klefstad, R.: A modular worst-case execution time analysis tool for Java processors. In: Proc. of RTAS 2008 (April 2008)

    Google Scholar 

  9. Hicks, M., Foster, J.S., Prattikakis, P.: Lock inference for atomic sections. In: Proc. of TRANSACT 2006 (June 2006)

    Google Scholar 

  10. Holsti, N., Långbacka, T., Saarinen, S.: Worst-case execution-time analysis for digital signal processors. In: Proc. of EUSIPCO 2000 (September 2000)

    Google Scholar 

  11. Lee, Y.-F., Ryder, B.G., Fiuczynski, M.E.: Region analysis: A parallel elimination method for data flow analysis. IEEE TSE 21, 913–926 (1995)

    Google Scholar 

  12. Li, Y.-T.S., Malik, S.: Performance analysis of real-time embedded software. Springer (November 1998)

    Google Scholar 

  13. Lundqvist, T., Stenström, P.: An integrated path and timing analysis method based on cycle-level symbolic execution. Real-Time Systems 17(2-3), 183–207 (1999)

    Article  Google Scholar 

  14. McCloskey, B., Zhou, F., Gay, D., Brewer, E.: Autolocker: Synchronization inference for atomic sections. In: Proc. of POPL 2006 (January 2006)

    Google Scholar 

  15. Navas, J., Méndez-Lojo, M., Hermenegildo, M.V.: User-definable resource usage bounds analysis for Java bytecode. ENTCS 253(5), 65–82 (2009)

    Google Scholar 

  16. Pratikakis, P., Foster, J.S., Hicks, M.W.: Existential Label Flow Inference Via CFL Reachability. In: Yi, K. (ed.) SAS 2006. LNCS, vol. 4134, pp. 88–106. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  17. Pugh, W.: The Omega Test: a fast and practical integer programming algorithm for dependence analysis. Communications of the ACM 8, 4–13 (1992)

    Google Scholar 

  18. Siek, K., Wojciechowski, P.T.: Statically computing upper bounds on object calls for pessimistic concurrency control. In: Proc. of the EC 2010: Workshop on Exploiting Concurrency Efficiently and Correctly (July 2010), Brief Announcement

    Google Scholar 

  19. Siek, K., Wojciechowski, P.T., Mruczkiewicz, W.: Atomic RMI documentation (2011), http://www.it-soa.pl/atomicrmi/

  20. Staschulat, J., Braam, J.C., Ernst, R., Rambow, T., Schlor, R., Busch, R.: Cost-efficient worst-case execution time analysis in industrial practice. In: Proc. of ISoLA 2006 (November 2006)

    Google Scholar 

  21. Theiling, H., Ferdinand, C., Wilhelm, R.: Fast and precise WCET prediction by separated cache and path analyses. Real-Time Syst. 18, 157–179 (2000)

    Article  Google Scholar 

  22. Vallée-Rai, R., Co, P., Gagnon, E., Hendren, L., Lam, P., Sundaresan, V.: Soot - a Java optimization framework. In: Proc. of CASCON 1999 (November 1999)

    Google Scholar 

  23. Vallée-Rai, R., Hendren, L.J.: Jimple: Simplifying Java bytecode for analyses and transformations. Technical Report 1998-4, McGill University (July 1998)

    Google Scholar 

  24. Wilhelm, R.: Determining bounds on execution times. In: Handbook on Embedded Systems, ch. 14. CRC Press (2006)

    Google Scholar 

  25. Wilhelm, R., Engblom, J., Ermedahl, A., Holsti, N., Thesing, S., Whalley, D.B., Bernat, G., Ferdinand, C., Heckmann, R., Mitra, T., Mueller, F., Puaut, I., Puschner, P.P., Staschulat, J., Stenström, P.: The worst-case execution time problem-overview of methods and survey of tools. ACM TECS 7(3) (April 2008)

    Google Scholar 

  26. Wojciechowski, P.T.: Language Design for Atomicity, Declarative Synchronization, and Dynamic Update in Communicating Systems. Poznań University of Technology Press (2007); Habilitation thesis

    Google Scholar 

  27. Wojciechowski, P.T., Siek, K.: Transaction concurrency control via dynamic scheduling based on static analysis. In: Proc. of WTM 2012 (April 2012)

    Google Scholar 

  28. Wolf, F., Ernst, R., Ye, W.: Path clustering in software timing analysis. IEEE Trans. Very Large Scale Integr. Syst. 9, 773–782 (2001)

    Article  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

Siek, K., Wojciechowski, P.T. (2012). A Formal Design of a Tool for Static Analysis of Upper Bounds on Object Calls in Java. In: Stoelinga, M., Pinger, R. (eds) Formal Methods for Industrial Critical Systems. FMICS 2012. Lecture Notes in Computer Science, vol 7437. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-32469-7_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-32469-7_13

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-32468-0

  • Online ISBN: 978-3-642-32469-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics