Abstract
Concurrent programs require high-level abstractions in order to manage complexity and enable compositional reasoning. In this paper, we introduce a novel concurrency abstraction, dubbed transactional events, which combines first-class synchronous messagepassing events with all-or-nothing transactions. This combination enables simple solutions to interesting problems in concurrent programming. For example, guarded synchronous receive can be implemented as an abstract transactional event, whereas in other languages it requires a non-abstract, non-modular protocol. Likewise, three-way rendezvous can also be implemented as an abstract transactional event, which is impossible using first-class events alone. Both solutions are easy to code and easy to reason about.The expressive power of transactional events arises from a sequencing combinator whose semantics enforces an all-or-nothing transactional property - either both of the constituent events synchronize in sequence or neither of them synchronizes. This sequencing combinator, along with a non-deterministic choice combinator, gives transactional events the compositional structure of a monad-with-plus. We provide a formal semantics for and a preliminary implementation of transactional events.
- Joe Armstrong, Robert Virding, Claes Wikström, and Mike Williams. Concurrent Programming in Erlang. Prentice-Hall, second edition, 1996. Google Scholar
Digital Library
- Matthew Flatt and Robert Bruce Findler. Kill-safe synchronization abstractions. In The Conference on Programming Language Design and Implementation (PLDI), pages 47--58, 2004. Google Scholar
Digital Library
- Emden R. Gasner and John H. Reppy. A multi-threaded high-order user interface toolkit. In Len Bass and Prasun Dewan, editors, User Interface Software, volume 1 of Software Trends, chapter 4, pages 61--80. John Wiley & Sons, 1993. Google Scholar
Digital Library
- Glasgow Haskell Compiler. http://www.haskell.org/ghc.Google Scholar
- Tim Harris and Keir Fraser. Language support for lightweight transactions. In The Conference on Object-oriented Programing, Systems, Languages, and Applications (OOPSLA), pages 388--402, 2003. Google Scholar
Digital Library
- Tim Harris, Simon Marlow, and Simon Peyton Jones. Haskell on a shared-memory multiprocessor. In The Workshop on Haskell, pages 49--61, 2005. Google Scholar
Digital Library
- Tim Harris, Simon Marlow, Simon Peyton Jones, and Maurice Herlihy. Composable memory transactions. In The Symposium on Principles and Practice of Parallel Programming (PPoPP), pages 48--60, 2005. Google Scholar
Digital Library
- Maurice Herlihy and J. Eliot B. Moss. Transactional memory: architectural support for lock-free data structures. In The International Symposium on Computer Architecture (ISCA), pages 289--300, 1993. Google Scholar
Digital Library
- Ralf Hinze. Deriving backtracking monad transformers (functional pearl). In The International Conference on Functional Programming (ICFP), pages 186--197, 2000. Google Scholar
Digital Library
- C.A.R. Hoare. Communicating sequential processes. Commun. ACM, 21(8):666--677, 1978. Google Scholar
Digital Library
- Alan Jeffrey. A fully abstract semantics for a concurrent functional language with monadic types. In The Symposium on Logic in Computer Science (LICS), pages 255--264, 1995. Google Scholar
Digital Library
- Einar Karlsen. The UniForM concurrency toolkit and its extensions to Concurrent Haskell. In The Glasgow Functional Programming Workshop (GFPW), 1997.Google Scholar
- Oleg Kiselyov, Chung-chieh Shan, Daniel Friedman, and Amr Sabry. Backtracking, interleaving, and terminating monad transformers (functional pearl). In The International Conference on Functional Programming (ICFP), pages 192--203, 2005. Google Scholar
Digital Library
- Simon Marlow, Simon Peyton Jones, Andrew Moran, and John Reppy. Asynchronous exceptions in Haskell. In The Conference on Programming Language Design and Implementation (PLDI), pages 274--285, 2001. Google Scholar
Digital Library
- Eugino Moggi. Notions of computation and monads. Information and Computation, 93(1):55--92, 1991. Google Scholar
Digital Library
- Prakash Panangaden and John Reppy. The essence of concurrent ML. In Flemming Nielson, editor, ML with Concurrency: Design, Analysis, Implementation, and Application, Springer Monographs in Computer Science. Springer-Verlag, 1997.Google Scholar
- Simon Peyton Jones. Tackling the awkward squad: monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell. In T. Hoare, B. Broy, and R. Steinbrüggen, editors, Engineering Theories of Software Construction, volume 180 of NATO Science Series: Computer & Systems Sciences. IOS Press, 2001.Google Scholar
- Simon Peyton Jones, Andrew Gordon, and Sigbjorn Finne. Concurrent Haskell. In The Symposium on Principles of Programming Languages (POPL), pages 295--308, 1996. Google Scholar
Digital Library
- Simon Peyton Jones and Philip Wadler. Imperative functional programming. In The Symposium on Principles of Programming Languages (POPL), pages 71--84, 1993. Google Scholar
Digital Library
- Rob Pike. A concurrent window system. Computing Systems, 2(2):133--153, 1989.Google Scholar
- John Reppy. Concurrent Programming in ML. Cambridge University Press, 1999. Google Scholar
Digital Library
- George Russell. Events in Haskell, and how to implement them. In The International Conference on Functional Programming (ICFP), pages 157--168, 2001. Google Scholar
Digital Library
- Davide Sanggiorgi and David Walker. The Π-calculus: A Theory of Mobile Processes. Cambridge University Press, 2001. Google Scholar
Digital Library
- Franklyn Turbak. First-class synchronization barriers. In The International Conference on Functional Programming (ICFP), pages 157--168, 1996. Google Scholar
Digital Library
- Philip Wadler. Monads for functional programming. In Johan Jeuring and Erik Meijer, editors, Advanced Functional Programming, volume 925 of Lecture Notes in Computer Science. Springer-Verlag, 1995. Google Scholar
Digital Library
- Adam Welc, Suresh Jagannathan, and Antony L. Hosking. Transactional monitors for concurrent objects. In The European Conference on Object-Oriented Programming (ECOOP), pages 519--542, 2004.Google Scholar
Cross Ref
Index Terms
Transactional events
Recommendations
Transactional events for ML
ICFP '08Transactional events (TE) are an approach to concurrent programming that enriches the first-class synchronous message-passing of Concurrent ML (CML) with a combinator that allows multiple messages to be passed as part of one all-or-nothing ...
Transactional events
ICFP '06: Proceedings of the eleventh ACM SIGPLAN international conference on Functional programmingConcurrent programs require high-level abstractions in order to manage complexity and enable compositional reasoning. In this paper, we introduce a novel concurrency abstraction, dubbed transactional events, which combines first-class synchronous ...
Transactional events for ML
ICFP '08: Proceedings of the 13th ACM SIGPLAN international conference on Functional programmingTransactional events (TE) are an approach to concurrent programming that enriches the first-class synchronous message-passing of Concurrent ML (CML) with a combinator that allows multiple messages to be passed as part of one all-or-nothing ...







Comments