International Conference on Distributed Computing and Internet Technology

Distributed Computing and Internet Technology pp 157-168 | Cite as

A Type System for Counting Logs of Multi-threaded Nested Transactional Programs

  • Anh-Hoang Truong
  • Dang Van Hung
  • Duc-Hanh Dang
  • Xuan-Tung Vu
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9581)


We present a type system to estimate an upper bound for the resource consumption of nested and multi-threaded transactional programs. The resource is abstracted as transaction logs. In comparison to our previous work on type and effect systems for Transactional Featherweight Java, this work exploits the natural composition of thread creation to give types to sub-terms. As a result, our new type system is simpler and more effective than our previous one. More important, it is more precise than our previous type system. We also show a type inference algorithm that we have implemented in a prototype tool.


Resource bound Software transactional memory Type systems 


  1. 1.
    Bezem, M., Hovland, D., Truong, H.: A type system for counting instances of software components. Theor. Comput. Sci. 458, 29–48 (2012)MATHCrossRefGoogle Scholar
  2. 2.
    Braberman, V., Garbervetsky, D., Yovine, S.: A static analysis for synthesizing parametric specifications of dynamic memory consumption. J. Object Technol. 5(5), 31–58 (2006)CrossRefGoogle Scholar
  3. 3.
    Chin, W.-N., Nguyen, H.H., Qin, S.C., Rinard, M.: Memory usage verification for OO programs. In: Hankin, C., Siveroni, I. (eds.) SAS 2005. LNCS, vol. 3672, pp. 70–86. Springer, Heidelberg (2005) CrossRefGoogle Scholar
  4. 4.
    Hofmann, M., Jost, S.: Static prediction of heap space usage for first-order functional programs. In: Proceedings of POPL 2003. ACM, January 2003Google Scholar
  5. 5.
    Hofmann, M.O., Jost, S.: Type-based amortised heap-space analysis. In: Sestoft, P. (ed.) ESOP 2006. LNCS, vol. 3924, pp. 22–37. Springer, Heidelberg (2006) CrossRefGoogle Scholar
  6. 6.
    Jagannathan, S., Vitek, J., Welc, A., Hosking, A.: A transactional object calculus. Sci. Comput. Program. 57(2), 164–186 (2005)MATHMathSciNetCrossRefGoogle Scholar
  7. 7.
    Mai Thuong Tran, T., Steffen, M., Truong, H.: Compositional static analysis for implicit join synchronization in a transactional setting. In: Hierons, R.M., Merayo, M.G., Bravetti, M. (eds.) SEFM 2013. LNCS, vol. 8137, pp. 212–228. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  8. 8.
    Pham, T.-H., Truong, A.-H., Truong, N.-T., Chin, W.-N.: A fast algorithm to compute heap memory bounds of Java Card applets. In: Software Engineering and Formal Methods (2008)Google Scholar
  9. 9.
    Shavit, N., Touitou, D.: Software transactional memory. In: Symposium on Principles of Distributed Computing, pp. 204–213 (1995)Google Scholar
  10. 10.
    Vu, X.-T., Mai Thuong Tran, T., Truong, A.-H., Steffen, M.: A type system for finding upper resource bounds of multi-threaded programs with nested transactions. In: Symposium on Information and Communication Technology SoICT 2012, pp. 21–30 (2012)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  • Anh-Hoang Truong
    • 1
  • Dang Van Hung
    • 1
  • Duc-Hanh Dang
    • 1
  • Xuan-Tung Vu
    • 2
  1. 1.VNU University of Engineering and TechnologyHanoiVietnam
  2. 2.Japan Advanced Institute of Science and TechnologyNomiJapan

Personalised recommendations