Safe Commits for Transactional Featherweight Java

  • Thi Mai Thuong Tran
  • Martin Steffen
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6396)


Transactions are a high-level alternative for low-level concurrency-control mechanisms such as locks, semaphores, monitors. A recent proposal for integrating transactional features into programming languages is Transactional Featherweight Java (TFJ), extending Featherweight Java by adding transactions. With support for nested and multi-threaded transactions, its transactional model is rather expressive. In particular, the constructs governing transactions —to start and to commit a transaction— can be used freely with a non-lexical scope. On the downside, this flexibility also allows for an incorrect use of these constructs, e.g., trying to perform a commit outside any transaction. To catch those kinds of errors, we introduce a static type and effect system for the safe use of transactions for TFJ. We prove the soundness of our type system by subject reduction.


Operational Semantic Sequential Composition Concurrency Control Transactional Memory Transactional Model 
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.
    Abadi, M., Birell, A., Harris, T., Isard, M.: Semantics of transactional memory and automatic mutual exclusion. In: Proceedings of POPL 2008. ACM, New York (2008)Google Scholar
  2. 2.
    Bigliardi, G., Laneve, C.: A type system for JVM threads. In: Proceedings of 3rd ACM SIGPLAN Workshop on Types in Compilation (TIC 2000), p. 2003 (2000)Google Scholar
  3. 3.
    Blundell, C., Lewis, E.C., Martin, M.K.: Subtleties of transactional memory atomicity semantics. IEEE Computer Architecture Letters 5(2) (2006)Google Scholar
  4. 4.
    Carlstrom, B.D., McDonald, A., Chafi, H., Chung, J., Minh, C.C., Kozyrakis, C., Oluktun, K.: The ATOMOΣ transactional programming language. In: ACM Conference on Programming Language Design and Implementation, Ottawa, Ontario, Canada. ACM, New York (2006)Google Scholar
  5. 5.
    Davare, A.: Concurrent BLAST, Internal Report, EECS Berkely. Mentors Rupak Majumdar and Ranjit Jhala, Mentors (2003)Google Scholar
  6. 6.
    Flanagan, C., Freund, S.: Atomizer: A dynamic atomicity checker for multithreaded programs. In: Proceedings of POPL 2004, pp. 256–267. ACM, New York (2004)Google Scholar
  7. 7.
    Flanagan, C., Quadeer, S.: A type and effect system for atomicity. In: ACM Conference on Programming Language Design and Implementation, San Diego, California. ACM, New York (2003)Google Scholar
  8. 8.
    Harris, T., Fraser, K.: Language support for lightweight transactions. In: Eighteenth OOPSLA 2003. SIGPLAN Notices. ACM, New York (2003)Google Scholar
  9. 9.
    Harris, T., Peyton Jones, S.M.S., Herlihy, M.: Composable memory transactions. In: PPoPP 2005: 10th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pp. 48–60 (June 2005)Google Scholar
  10. 10.
    Havelund, K., Pressburger, T.: Model checking Java programs using Java PathFinder. International Journal on Software Tools for Technology Transfer 2(4), 366–381 (2000)CrossRefMATHGoogle Scholar
  11. 11.
    Henzinger, T.A., Jhala, R., Majumdar, R., Sutre, G.: Software verification with BLAST. In: Ball, T., Rajamani, S.K. (eds.) SPIN 2003. LNCS, vol. 2648, pp. 235–239. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  12. 12.
    Igarashi, A., Kobayashi, N.: Resource usage analysis. ACM Transactions on Programming Languages and Systems 27(2), 264–313 (2005)CrossRefMATHGoogle Scholar
  13. 13.
    Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: A minimal core calculus for Java and GJ. In: OOPSLA 1999. SIGPLAN Notices, pp. 132–146. ACM, New York (1999)Google Scholar
  14. 14.
    Isard, M., Birell, A.: Automatic mutual exclusion. In: Proceedings of the 11th Workshop on Hot Topics in Operating Systems (2007)Google Scholar
  15. 15.
    Jagannathan, S., Vitek, J., Welc, A., Hosking, A.: A transactional object calculus. Science of Computer Programming 57(2), 164–186 (2005)MathSciNetCrossRefMATHGoogle Scholar
  16. 16.
    Johnsen, E.B., Owe, O., Yu, I.C.: Creol: A type-safe object-oriented model for distributed concurrent systems. Theoretical Computer Science 365(1-2), 23–66 (2006)MathSciNetCrossRefMATHGoogle Scholar
  17. 17.
    Tran, T.M.T., Owe, O., Steffen, M.: Safe typing for transactional vs. lock-based concurrency in multi-threaded Java. In: Proceedings of the Second International Conference on Knowledge and Systems Engineering, KSE 2010 (accepted for publication 2010)Google Scholar
  18. 18.
    Nielson, F., Nielson, H.-R., Hankin, C.L.: Principles of Program Analysis. Springer, Heidelberg (1999)CrossRefMATHGoogle Scholar
  19. 19.
    Ranganath, V.P., Hatcliff, J.: Slicing concurrent Java programs using Indus and Kaveri. International Journal of Software Tools and Technology Transfer 9(5), 489–504 (2007)CrossRefGoogle Scholar
  20. 20.
    Steffen, M., Tran, T.M.T.: Safe commits for Transactional Featherweight Java. Technical Report 392, University of Oslo, Dept. of Computer Science (October 2009)Google Scholar
  21. 21.
    Welc, A., Jagannathan, S., Hosking, A.: Transactional monitors for concurrent objects. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 518–541. Springer, Heidelberg (2004)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Thi Mai Thuong Tran
    • 1
  • Martin Steffen
    • 1
  1. 1.Department of InformaticsUniversity of OsloNorway

Personalised recommendations