Cost Analysis of Concurrent OO Programs

  • Elvira Albert
  • Puri Arenas
  • Samir Genaim
  • Miguel Gómez-Zamalloa
  • German Puebla
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7078)


Cost analysis aims at automatically approximating the resource consumption (e.g., memory) of executing a program in terms of its input parameters. While cost analysis for sequential programming languages has received considerable attention, concurrency and distribution have been notably less studied. The main challenges (and our contributions) of cost analysis in a concurrent setting are: (1) Inferring precise size relations for data in the program in the presence of shared memory. This information is essential for bounding the number of iterations of loops. (2) Distribution suggests that analysis must keep the cost of the diverse distributed components separate. We handle this by means of a novel form of recurrence equations which are parametric on the notion of cost center, which represents a corresponding component. To the best of our knowledge, our work is the first one to present a general cost analysis framework and an implementation for concurrent OO programs.


Cost Analysis Shared Memory Cost Model Concurrent Program Cost Center 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Albert, E., Arenas, P., Genaim, S., Puebla, G.: Closed-Form Upper Bounds in Static Cost Analysis. Journal of Automated Reasoning 46(2), 161–203 (2011)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Albert, E., Arenas, P., Genaim, S., Puebla, G., Ramírez Deantes, D.V.: 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
  3. 3.
    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
  4. 4.
    Albert, E., Arenas, P., Genaim, S., Zanardini, D.: Task-Level Analysis for a Language with Async-Finish parallelism. In: Proc. of LCTES 2011, pp. 21–30. ACM (2011)Google Scholar
  5. 5.
    Benoy, F., King, A.: Inferring Argument Size Relationships with CLP(R). In: Gallagher, J.P. (ed.) LOPSTR 1996. LNCS, vol. 1207, pp. 204–223. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  6. 6.
    Cook, B., Podelski, A., Rybalchenko, A.: Proving Thread Termination. In: Proc. of PLDI 2007, pp. 320–330. ACM (2007)Google Scholar
  7. 7.
    Crary, K., Weirich, S.: Resource Bound Certification. In: Proc. of POPL 2000, pp. 184–198. ACM (2000)Google Scholar
  8. 8.
    de Boer, F.S., Clarke, D., Johnsen, E.B.: A Complete Guide to the Future. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 316–330. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  9. 9.
    Fähndrich, M.: Static Verification for Code Contracts. In: Cousot, R., Martel, M. (eds.) SAS 2010. LNCS, vol. 6337, pp. 2–5. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  10. 10.
    Ferrari, G.L., Montanari, U.: Dynamic Matrices and the Cost Analysis of Concurrent Programs. In: Alagar, V.S., Nivat, M. (eds.) AMAST 1995. LNCS, vol. 936, pp. 307–321. Springer, Heidelberg (1995)CrossRefGoogle Scholar
  11. 11.
    Gulwani, S., Mehra, K.K., Chilimbi, T.M.: Speed: precise and efficient static estimation of program computational complexity. In: Proc. of POPL 2009, pp. 127–139. ACM (2009)Google Scholar
  12. 12.
    Hoffmann, J., Hofmann, M.: Amortized Resource Analysis with Polynomial Potential. In: Gordon, A.D. (ed.) ESOP 2010. LNCS, vol. 6012, pp. 287–306. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  13. 13.
    Johnsen, E.B., Hähnle, R., Schäfer, J., Schlatte, R., Steffen, M.: ABS: A Core Language for Abstract Behavioral Specification. In: Proc. FMCO 2010. Springer, Heidelberg (2010)Google Scholar
  14. 14.
    Johnsen, E.B., Owe, O.: An Asynchronous Communication Model for Distributed concurrent objects. Software and Systems Modeling 6(1), 35–58 (2007)CrossRefGoogle Scholar
  15. 15.
    Kero, M., Pietrzak, P., Nordlander, J.: Live Heap Space Bounds for Real-Time Systems. In: Ueda, K. (ed.) APLAS 2010. LNCS, vol. 6461, pp. 287–303. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  16. 16.
    Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice-Hall, Inc., Upper Saddle River (1997)zbMATHGoogle Scholar
  17. 17.
    Jarvis, S.A., Morgan, R.G.: Profiling Large-Scale Lazy Functional Programs. Journal of Functional Programing 8(3), 201–237 (1998)CrossRefzbMATHGoogle Scholar
  18. 18.
    Schäfer, J., Poetzsch-Heffter, A.: JCoBox: Generalizing Active Objects to Concurrent Components. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 275–299. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  19. 19.
    Spoto, F., Mesnard, F., Payet, É.: A Termination Analyser for Java Bytecode based on Path-Length. ACM TOPLAS 32(3) (2010)Google Scholar
  20. 20.
    Srinivasan, S., Mycroft, A.: Kilim: Isolation-Typed Actors for Java. In: Ryan, M. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 104–128. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  21. 21.
    Vallee-Rai, R., Hendren, L., Sundaresan, V., Lam, P., Gagnon, E., Co, P.: Soot - a Java Optimization Framework. In: Proc. of CASCON 1999, pp. 125–135. IBM (1999)Google Scholar
  22. 22.
    Wegbreit, B.: Mechanical Program Analysis. Comm. of the ACM 18(9) (1975)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Elvira Albert
    • 1
  • Puri Arenas
    • 1
  • Samir Genaim
    • 1
  • Miguel Gómez-Zamalloa
    • 1
  • German Puebla
    • 2
  1. 1.DSICComplutense University of MadridSpain
  2. 2.DLSIISTechnical University of MadridSpain

Personalised recommendations