Advertisement

CoBoxes: Unifying Active Objects and Structured Heaps

  • Jan Schäfer
  • Arnd Poetzsch-Heffter
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5051)

Abstract

Concurrent programming in object-oriented languages is a notoriously difficult task. We propose coboxes – a novel language concept which combines and generalizes active objects and techniques for heap structuring. CoBoxes realize a data-centric approach that guarantees mutual-exclusion for groups of objects. This is important for more complex data structures with invariants ranging over several objects. CoBoxes support multiple entry objects, several cooperating tasks in a cobox, and nesting of coboxes for composition and internal parallelism. Communication between coboxes is handled by asynchronous method calls with futures, which is in particular suitable for distributed programming. In this paper, we explain how aspects of concurrent programming can be solved by coboxes. We develop a core language for coboxes and present a formal operational semantics for this language.

Keywords

Active Task Active Object Concurrent Programming Transactional Memory Incoming Message 
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.

References

  1. 1.
    Agha, G.: Actors: a model of concurrent computation in distributed systems. MIT Press, Cambridge (1986)Google Scholar
  2. 2.
    Aldrich, J., Chambers, C.: Ownership domains: Separating aliasing policy from mechanism. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 1–25. Springer, Heidelberg (2004)Google Scholar
  3. 3.
    Bacon, D.F., Strom, R.E., Tarafdar, A.: Guava: a dialect of java without data races. In: OOPSLA 2000, pp. 382–400. ACM Press, New York (2000)CrossRefGoogle Scholar
  4. 4.
    Benton, N., Cardelli, L., Fournet, C.: Modern concurrency abstractions for C#. In: Magnusson, B. (ed.) ECOOP 2002. LNCS, vol. 2374, pp. 415–440. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  5. 5.
    Boyapati, C., Lee, R., Rinard, M.: Ownership types for safe programming: Preventing data races and deadlocks. In: OOPSLA 2002, November 2002, pp. 211–230. ACM Press, New York (2002)CrossRefGoogle Scholar
  6. 6.
    Boyapati, C., Liskov, B., Shrira, L.: Ownership types for object encapsulation. In: POPL 2003, pp. 213–223. ACM Press, New York (2003)Google Scholar
  7. 7.
    Caromel, D.: Towards a method of object-oriented concurrent programming. Comm. ACM 36(9), 90–102 (1993)CrossRefGoogle Scholar
  8. 8.
    Caromel, D., Henrio, L., Serpette, B.P.: Asynchronous and deterministic objects. In: POPL 2004, pp. 123–134. ACM Press, New York (2004)Google Scholar
  9. 9.
    Caromel, D., Mateu, L.: Éric Tanter: Sequential object monitors. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 316–340. Springer, Heidelberg (2004)Google Scholar
  10. 10.
    Caromel, D., Mateu, L., Pothier, G.: Éric Tanter: Parallel object monitors. Concurrency and Computation: Practice and Experience (to appear, 2007)Google Scholar
  11. 11.
    Clarke, D., Potter, J., Noble, J.: Ownership types for flexible alias protection. In: OOPSLA 1998, pp. 48–64. ACM Press, New York (1998)CrossRefGoogle Scholar
  12. 12.
    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
  13. 13.
    Dietl, W., Müller, P.: Universes: Lightweight ownership for JML. Journal of Object Technology 4(8), 5–32 (2005)Google Scholar
  14. 14.
    Felleisen, M., Hieb, R.: The revised report on the syntactic theories of sequential control and state. Theorectical Computer Science 103(2), 235–271 (1992)CrossRefMathSciNetzbMATHGoogle Scholar
  15. 15.
    Flanagan, C., Freund, S.N., Lifshin, M.: Type inference for atomicity. In: TLDI 2005, pp. 47–58. ACM Press, New York (2005)CrossRefGoogle Scholar
  16. 16.
    Flatt, M., Krishnamurthi, S., Felleisen, M.: A programmer’s reduction semantics for classes and mixins. Formal Syntax and Semantics of Java 1523, 241–269 (1999)CrossRefGoogle Scholar
  17. 17.
    Fournet, C., Gonthier, G.: The reflexive CHAM and the join-calculus. In: POPL 1996, pp. 372–385. ACM Press, New York (1996)Google Scholar
  18. 18.
    Haller, P., Cutsem, T.V.: Implementing joins using extensible pattern matching. Technical Report LAMP-REPORT-2007-004, EPFL (August 2007)Google Scholar
  19. 19.
    Hansen, P.B.: Structured multiprogramming. Comm. ACM 15(7), 574–578 (1972)CrossRefGoogle Scholar
  20. 20.
    Hansen, P.B.: 7.2 Class Concept. In: Operation System Principles, pp. 226–232. Prentice-Hall, Englewood Cliffs (1973)Google Scholar
  21. 21.
    Harris, T., Fraser, K.: Language support for lightweight transactions. In: Crocker Jr., R., G.L.S. (eds.) OOPSLA 2003, pp. 388–402. ACM Press, New York (2003)CrossRefGoogle Scholar
  22. 22.
    Haustein, M., Löhr, K.P.: Jac: declarative Java concurrency. Concurrency and Computation: Practice and Experience 18(5), 519–546 (2006)CrossRefGoogle Scholar
  23. 23.
    Herlihy, M., Moss, J.E.B.: Transactional memory: Architectural support for lock-free data structures. In: Proc. Int. Symp. on Computer Architecture (1993)Google Scholar
  24. 24.
    Herlihy, M., Luchangco, V., Moir, M.: A flexible framework for implementing software transactional memory. In: Tarr, P.L., Cook, W.R. (eds.) OOPSLA 2006, pp. 253–262. ACM Press, New York (2006)CrossRefGoogle Scholar
  25. 25.
    Hindman, B., Grossman, D.: Atomicity via source-to-source translation. In: MSPC 2006, pp. 82–91. ACM Press, New York (2006)CrossRefGoogle Scholar
  26. 26.
    Hoare, C.A.R.: Towards a theory of parallel programming. In: Operating System Techniques, pp. 61–71. Academic Press, London (1972)Google Scholar
  27. 27.
    Hoare, C.A.R.: Monitors: An operating system structuring concept. Comm. ACM 17(10), 549–577 (1974)CrossRefzbMATHGoogle Scholar
  28. 28.
    Hogg, J., Lea, D., Wills, A., de Champeaux, D., Holt, R.: The Geneva convention on the treatment of object aliasing. SIGPLAN OOPS Messenger 3(2), 11–16 (1992)CrossRefGoogle Scholar
  29. 29.
    Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: A minimal core calculus for Java and GJ. TOPLAS 23(3), 396–450 (2001)CrossRefGoogle Scholar
  30. 30.
    Jacobs, B., Piessens, F., Leino, K.R.M., Schulte, W.: Safe concurrency for aggregate objects with invariants. In: Aichernig, B.K., Beckert, B. (eds.) SEFM, pp. 137–147. IEEE Computer Society, Los Alamitos (2005)Google Scholar
  31. 31.
    Jacobs, B., Smans, J., Piessens, F., Schulte, W.: A statically verifiable programming model for concurrent object-oriented programs. In: Liu, Z., He, J. (eds.) ICFEM 2006. LNCS, vol. 4260, pp. 420–439. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  32. 32.
    Johnsen, E.B., Owe, O.: An asynchronous communication model for distributed concurrent objects. Software and Systems Modeling 6(1), 35–58 (2007)Google Scholar
  33. 33.
    Lieberman, H.: Concurrent object-oriented programming in Act 1. In: Yonezawa, A., Tokoro, M. (eds.) Object-Oriented Concurrent Programming, pp. 9–36. MIT Press, Cambridge (1987)Google Scholar
  34. 34.
    Lu, Y., Potter, J.: On ownership and accessibility. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 99–123. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  35. 35.
    Lu, Y., Potter, J., Xue, J.: Validity invariants and effects. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 202–226. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  36. 36.
    Müller, P., Poetzsch-Heffter, A.: A type system for controlling representation exposure in Java. In: Drossopoulou, S., Eisenbach, S., Jacobs, B., Leavens, G.T., Müler, P., Poetzsch-Heffter, A. (eds.) Formal Techniques for Java Programs, Technical Report 269–5, Fernuniversität Hagen (2000)Google Scholar
  37. 37.
    Poetzsch-Heffter, A., Schäfer, J.: A representation-independent behavioral semantics for object-oriented components. In: Bonsangue, M.M., Johnsen, E.B. (eds.) FMOODS 2007. LNCS, vol. 4468, pp. 157–173. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  38. 38.
    Schäfer, J., Poetzsch-Heffter, A.: A parameterized type system for simple loose ownership domains. Journal of Object Technology 5(6), 71–100 (2007)Google Scholar
  39. 39.
    Shavit, N., Touitou, D.: Software transactional memory. In: PODC, pp. 204–213 (1995)Google Scholar
  40. 40.
    Smaragdakis, Y., Kay, A., Behrends, R., Young, M.: Transactions with isolation and cooperation. In: Gabriel, R.P., Bacon, D.F., Lopes, C.V., Steele Jr., G.L. (eds.) OOPSLA 2007, pp. 191–210. ACM Press, New York (2007)CrossRefGoogle Scholar
  41. 41.
    Vaziri, M., Tip, F., Dolby, J.: Associating synchronization constraints with data in an object-oriented language. In: POPL 2006, pp. 334–345. ACM Press, New York (2006)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Jan Schäfer
    • 1
  • Arnd Poetzsch-Heffter
    • 1
  1. 1.University of Kaiserslautern 

Personalised recommendations