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.
Chapter PDF
Similar content being viewed by others
Keywords
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
Agha, G.: Actors: a model of concurrent computation in distributed systems. MIT Press, Cambridge (1986)
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)
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)
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)
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)
Boyapati, C., Liskov, B., Shrira, L.: Ownership types for object encapsulation. In: POPL 2003, pp. 213–223. ACM Press, New York (2003)
Caromel, D.: Towards a method of object-oriented concurrent programming. Comm. ACM 36(9), 90–102 (1993)
Caromel, D., Henrio, L., Serpette, B.P.: Asynchronous and deterministic objects. In: POPL 2004, pp. 123–134. ACM Press, New York (2004)
Caromel, D., Mateu, L.: Éric Tanter: Sequential object monitors. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 316–340. Springer, Heidelberg (2004)
Caromel, D., Mateu, L., Pothier, G.: Éric Tanter: Parallel object monitors. Concurrency and Computation: Practice and Experience (to appear, 2007)
Clarke, D., Potter, J., Noble, J.: Ownership types for flexible alias protection. In: OOPSLA 1998, pp. 48–64. ACM Press, New York (1998)
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)
Dietl, W., Müller, P.: Universes: Lightweight ownership for JML. Journal of Object Technology 4(8), 5–32 (2005)
Felleisen, M., Hieb, R.: The revised report on the syntactic theories of sequential control and state. Theorectical Computer Science 103(2), 235–271 (1992)
Flanagan, C., Freund, S.N., Lifshin, M.: Type inference for atomicity. In: TLDI 2005, pp. 47–58. ACM Press, New York (2005)
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)
Fournet, C., Gonthier, G.: The reflexive CHAM and the join-calculus. In: POPL 1996, pp. 372–385. ACM Press, New York (1996)
Haller, P., Cutsem, T.V.: Implementing joins using extensible pattern matching. Technical Report LAMP-REPORT-2007-004, EPFL (August 2007)
Hansen, P.B.: Structured multiprogramming. Comm. ACM 15(7), 574–578 (1972)
Hansen, P.B.: 7.2 Class Concept. In: Operation System Principles, pp. 226–232. Prentice-Hall, Englewood Cliffs (1973)
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)
Haustein, M., Löhr, K.P.: Jac: declarative Java concurrency. Concurrency and Computation: Practice and Experience 18(5), 519–546 (2006)
Herlihy, M., Moss, J.E.B.: Transactional memory: Architectural support for lock-free data structures. In: Proc. Int. Symp. on Computer Architecture (1993)
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)
Hindman, B., Grossman, D.: Atomicity via source-to-source translation. In: MSPC 2006, pp. 82–91. ACM Press, New York (2006)
Hoare, C.A.R.: Towards a theory of parallel programming. In: Operating System Techniques, pp. 61–71. Academic Press, London (1972)
Hoare, C.A.R.: Monitors: An operating system structuring concept. Comm. ACM 17(10), 549–577 (1974)
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)
Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: A minimal core calculus for Java and GJ. TOPLAS 23(3), 396–450 (2001)
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)
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)
Johnsen, E.B., Owe, O.: An asynchronous communication model for distributed concurrent objects. Software and Systems Modeling 6(1), 35–58 (2007)
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)
Lu, Y., Potter, J.: On ownership and accessibility. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 99–123. Springer, Heidelberg (2006)
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)
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)
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)
Schäfer, J., Poetzsch-Heffter, A.: A parameterized type system for simple loose ownership domains. Journal of Object Technology 5(6), 71–100 (2007)
Shavit, N., Touitou, D.: Software transactional memory. In: PODC, pp. 204–213 (1995)
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)
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)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Schäfer, J., Poetzsch-Heffter, A. (2008). CoBoxes: Unifying Active Objects and Structured Heaps. In: Barthe, G., de Boer, F.S. (eds) Formal Methods for Open Object-Based Distributed Systems. FMOODS 2008. Lecture Notes in Computer Science, vol 5051. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-68863-1_13
Download citation
DOI: https://doi.org/10.1007/978-3-540-68863-1_13
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-68862-4
Online ISBN: 978-3-540-68863-1
eBook Packages: Computer ScienceComputer Science (R0)