skip to main content
10.5555/1788954.1788974guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Actors with multi-headed message receive patterns

Published: 04 June 2008 Publication History

Abstract

The actor model provides high-level concurrency abstractions to coordinate simultaneous computations by message passing. Languages implementing the actor model such as Erlang commonly only support single-headed pattern matching over received messages. We propose and design an extension of Erlang style actors with receive clauses containing multi-headed message patterns. Patterns may be non-linear and constrained by guards. We provide a number of examples to show the usefulness of the extension. We also explore the design space for multi-headed message matching semantics, for example first-match and rule priority-match semantics. The various semantics are inspired by the multi-set constraint matching semantics found in Constraint Handling Rules. This provides us with a formal model to study actors with multiheaded message receive patterns. The system can be implemented efficiently and we have built a prototype as a library-extension to Haskell.

References

[1]
Agha, G.: ACTORS: A Model of Concurrent Computation in Distributed Systems. MIT Press, Cambridge (1986).
[2]
Armstrong, J., Virding, R., Wikström, C., Williams, M.: Concurrent Programming in Erlang, 2nd edn. Prentice-Hall, Englewood Cliffs (1996).
[3]
Duck, G.J., Stuckey, P.J., García de la Banda, M.J., Holzbaur, C.: The refined operational semantics of Constraint Handling Rules. In: Demoen, B., Lifschitz, V. (eds.) ICLP 2004. LNCS, vol. 3132, pp. 90-104. Springer, Heidelberg (2004).
[4]
Fournet, C., Gonthier, G.: The join calculus: A language for distributed mobile programming. In: Barthe, G., Dybjer, P., Pinto, L., Saraiva, J. (eds.) APPSEM 2000. LNCS, vol. 2395, pp. 268-332. Springer, Heidelberg (2002).
[5]
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).
[6]
Frühwirth, T.: Theory and practice of Constraint Handling Rules. J. Logic Programming, Special Issue on Constraint Logic Programming 37(1-3), 95-138 (1998).
[7]
Glasgow haskell compiler home page, http://www.haskell.org/ghc/
[8]
Haller, P., Van Cutsem, T.: Implementing Joins using extensible pattern matching. LNCS, vol. 5052. Springer, Heidelberg
[9]
HaskellActor, http://code.google.com/p/haskellactor/
[10]
Holzbaur, C., García de la Banda, M.J., Stuckey, P.J., Duck, G.J.: Optimizing compilation of Constraint Handling Rules in HAL. TPLP 5(4-5), 503-531 (2005).
[11]
Kahn, K., Saraswat, V.A.: Actors as a special case of concurrent constraint (logic) programming. In: Proc. of OOPSLA/ECOOP, pp. 57-66. ACM, New York (1990).
[12]
De Koninck, L., Schrijvers, T., Demoen, B.: User-definable rule priorities for CHR. In: Proc. of PPDP 2007, pp. 25-36. ACM, New York (2007).
[13]
De Koninck, L., Stuckey, P.J., Duck, G.J.: Optimizing compilation of CHR with rule priorities. In: FLOPS 2008. LNCS, vol. 4989. Springer, Heidelberg (2008).
[14]
Lam, E.S.L., Sulzmann, M.: A concurrent Constraint Handling Rules implementation in Haskell with software transactional memory. In: Proc. of DAMP 2007, pp. 19-24. ACM Press, New York (2007).
[15]
Peyton Jones, S. (ed.): Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, Cambridge (2003).
[16]
Schrijvers, T.: Analyses, Optimizations and Extensions of Constraint Handling Rules. PhD thesis, K.U.Leuven, Leuven, Belgium (June 2005).
[17]
Sulzmann, M., Lam, E.S.L.: Haskell - Join - Rules. In: Draft Proc. of IFL 2007 (September 2007).
[18]
Trono, J.A.: A new exercise in concurrency. SIGCSE Bull. 26(3), 8-10 (1994).
[19]
Varela, C., Agha, G.: Programming dynamically reconfigurable open systems with SALSA. SIGPLAN Not 36(12), 20-34 (2001).
[20]
Wright, A.K., Felleisen, M.: A syntactic approach to type soundness. A syntactic approach to type soundness 115(1), 38-94 (1994).

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Guide Proceedings
COORDINATION'08: Proceedings of the 10th international conference on Coordination models and languages
June 2008
347 pages
ISBN:3540682643
  • Editors:
  • Doug Lea,
  • Gianluigi Zavattaro

Publisher

Springer-Verlag

Berlin, Heidelberg

Publication History

Published: 04 June 2008

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 24 Dec 2024

Other Metrics

Citations

Cited By

View all

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media