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

  • Konrad Siek
  • Paweł T. Wojciechowski
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7437)


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.


static analysis data flow analysis transactional memory 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 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. 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)CrossRefGoogle Scholar
  3. 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. 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. 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)CrossRefGoogle Scholar
  6. 6.
    Gagnon, É.M., Hendren, L.J.: SableCC, an object-oriented compiler framework. In: Proc. of TOOLS 1998 (August 1998)Google Scholar
  7. 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. 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. 9.
    Hicks, M., Foster, J.S., Prattikakis, P.: Lock inference for atomic sections. In: Proc. of TRANSACT 2006 (June 2006)Google Scholar
  10. 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. 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. 12.
    Li, Y.-T.S., Malik, S.: Performance analysis of real-time embedded software. Springer (November 1998)Google Scholar
  13. 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)CrossRefGoogle Scholar
  14. 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. 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. 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)CrossRefGoogle Scholar
  17. 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. 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 AnnouncementGoogle Scholar
  19. 19.
    Siek, K., Wojciechowski, P.T., Mruczkiewicz, W.: Atomic RMI documentation (2011),
  20. 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. 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)CrossRefGoogle Scholar
  22. 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. 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. 24.
    Wilhelm, R.: Determining bounds on execution times. In: Handbook on Embedded Systems, ch. 14. CRC Press (2006)Google Scholar
  25. 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. 26.
    Wojciechowski, P.T.: Language Design for Atomicity, Declarative Synchronization, and Dynamic Update in Communicating Systems. Poznań University of Technology Press (2007); Habilitation thesisGoogle Scholar
  27. 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. 28.
    Wolf, F., Ernst, R., Ye, W.: Path clustering in software timing analysis. IEEE Trans. Very Large Scale Integr. Syst. 9, 773–782 (2001)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Konrad Siek
    • 1
  • Paweł T. Wojciechowski
    • 1
  1. 1.Poznań University of TechnologyPoland

Personalised recommendations