Implementing Joins Using Extensible Pattern Matching

  • Philipp Haller
  • Tom Van Cutsem
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5052)


Join patterns are an attractive declarative way to synchronize both threads and asynchronous distributed computations. We explore joins in the context of extensible pattern matching that recently appeared in languages such as F# and Scala. Our implementation supports join patterns with multiple synchronous events, and guards. Furthermore, we integrated joins into an existing actor-based concurrency framework. It enables join patterns to be used in the context of more advanced synchronization modes, such as future-type message sending and token-passing continuations.


Concurrent Programming Join Patterns Chords Actors 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Agha, G.A.: ACTORS: A Model of Concurrent Computation in Distributed Systems. MIT Press, Cambridge (1986)Google Scholar
  2. 2.
    Armstrong, J., Virding, R., Wikström, C., Williams, M.: Concurrent Programming in Erlang, 2nd edn. Prentice-Hall, Englewood Cliffs (1996)Google Scholar
  3. 3.
    Benton, N., Cardelli, L., Fournet, C.: Modern concurrency abstractions for C#. ACM Trans. Program. Lang. Syst 26(5), 769–804 (2004)CrossRefGoogle Scholar
  4. 4.
    Chrysanthakopoulos, G., Singh, S.: An asynchronous messaging library for C#. In: Proc. SCOOL Workshop, OOPSLA (2005)Google Scholar
  5. 5.
    Donnelly, K., Fluet, M.: Transactional events. In: Proc. ICFP, pp. 124–135. ACM, New York (2006)Google Scholar
  6. 6.
    Emir, B., Odersky, M., Williams, J.: Matching Objects with Patterns. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 273–298. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  7. 7.
    Fournet, C., Le Fessant, F., Maranget, L., Schmitt, A.: JoCaml: A language for concurrent distributed and mobile programming. In: Jeuring, J., Jones, S.L.P. (eds.) AFP 2002. LNCS, vol. 2638, pp. 129–158. Springer, Heidelberg (2003)Google Scholar
  8. 8.
    Fournet, C., Gonthier, G.: The reflexive chemical abstract machine and the join-calculus. In: Proc. POPL, January 1996, pp. 372–385. ACM, New York (1996)Google Scholar
  9. 9.
    Fournet, C., Gonthier, G., Lévy, J.-J., Maranget, L., Rémy, D.: A Calculus of Mobile Agents. In: Proc. CONCUR, August 1996, pp. 406–421. Springer, Heidelberg (1996)Google Scholar
  10. 10.
    Frølund, S., Agha, G.: Abstracting interactions based on message sets. In: Ciancarini, P., Nierstrasz, O., Yonezawa, A. (eds.) ECOOP-WS 1994. LNCS, vol. 924, pp. 107–124. Springer, Heidelberg (1995)Google Scholar
  11. 11.
    Haller, P., Odersky, M.: Actors that unify threads and events. In: Murphy, A.L., Vitek, J. (eds.) COORDINATION 2007. LNCS, vol. 4467, pp. 171–190. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  12. 12.
    Halstead Jr., R.H.: Multilisp: a language for concurrent symbolic computation. ACM Trans. Program. Lang. Syst. 7(4), 501–538 (1985)zbMATHCrossRefGoogle Scholar
  13. 13.
    Kafura, D., Mukherji, M., Lavender, G.: ACT++: A Class Library for Concurrent Programming in C++ using Actors. J. of Object-Oriented Programming 6(6) (1993)Google Scholar
  14. 14.
    Odersky, M.: Functional Nets. In: Proc. ESOP. LNCS, Springer, Heidelberg (2000)Google Scholar
  15. 15.
    Okasaki, C.: Views for Standard ML. In: Proc. SIGPLAN Workshop on ML (1998)Google Scholar
  16. 16.
    Reppy, J.H.: CML: A higher-order concurrent language. In: Proc. PLDI, pp. 293–305. ACM Press, New York (1991)Google Scholar
  17. 17.
    Russo, C.V.: The Joins concurrency library. In: Proc. PADL, pp. 260–274 (2007)Google Scholar
  18. 18.
    Singh, S.: Higher-order combinators for join patterns using STM. In: Proc. TRANSACT Workshop, OOPSLA (2006)Google Scholar
  19. 19.
    Sulzmann, M., Lam, E.S.L., Van Weert, P.: Actors with multi-headed message receive patterns. In: Proc. COORDINATION. LNCS, Springer, Heidelberg (2008)Google Scholar
  20. 20.
    Syme, D., Neverov, G., Margetson, J.: Extensible pattern matching via a lightweight language extension. In: Proc. ICFP, pp. 29–40. ACM Press, New York (2007)Google Scholar
  21. 21.
    Tomlinson, C., Singh, V.: Inheritance and synchronization with enabled-sets. ACM SIGPLAN Notices 24(10), 103–112 (1989)CrossRefGoogle Scholar
  22. 22.
    Varela, C., Agha, G.: Programming dynamically reconfigurable open systems with SALSA. ACM SIGPLAN Notices 36(12), 20–34 (2001)CrossRefGoogle Scholar
  23. 23.
    von Itzstein, G.S., Kearney, D.: Join Java: An alternative concurrency semantic for Java. Technical report, University of South Australia (2001)Google Scholar
  24. 24.
    Wadler, P.: Views: A way for pattern matching to cohabit with data abstraction. In: Proc. POPL, pp. 307–313 (1987)Google Scholar
  25. 25.
    Yonezawa, A., Briot, J.-P., Shibayama, E.: Object-oriented concurrent programming in ABCL/1. In: Proc. OOPSLA, pp. 258–268 (1986)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Philipp Haller
    • 1
  • Tom Van Cutsem
    • 2
  1. 1.EPFLLausanneSwitzerland
  2. 2.Vrije Universiteit BrusselBelgium

Personalised recommendations