A High-Level Implementation of Composable Memory Transactions in Concurrent Haskell

  • Frank Huch
  • Frank Kupke
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4015)


Composable memory transactions are a new communication abstraction for Concurrent Haskell which provides the programmer with a composable communication concept. Unfortunately, composable memory transactions are implemented as external functions for ghc version 6.4 and not available for other implementations of Concurrent Haskell. We present an implementation of memory transactions within Concurrent Haskell. The presented library can be executed within older ghc versions as well as with the popular Hugs system. Benchmarks show that our library performes well. Furthermore, our (high-level) implementation can be extended and maintained more easily than the low-level implementation provided by ghc 6.4.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Christiansen, J., Huch, F.: Searching for deadlocks while debugging concurrent haskell programs. In: ICFP 2004: Proceedings of the ninth ACM SIGPLAN international conference on Functional programming, pp. 28–39. ACM Press, New York (2004)CrossRefGoogle Scholar
  2. 2.
    Claessen, K.: A poor man’s concurrency monad. Journal of Functional Programming 9(3), 313–323 (1999)MATHCrossRefGoogle Scholar
  3. 3.
    Discolo, A., Harris, T., Marlow, S., Jones, S.L.P., Singh, S.: Lock free data structures using STM in haskell. In: Hagiya, M., Wadler, P. (eds.) FLOPS 2006. LNCS, vol. 3945, pp. 65–80. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  4. 4.
    Dornan, C.: Tcl + Haskell = TclHaskell. In: Glasgow FP Group Workshop, Pitlochry, Scotland (September 1998), http://www.dcs.gla.ac.uk/~nww/TkHaskell/TkHaskell.html
  5. 5.
    Chakravarty, M. (ed.): The Haskell 98 foreign function interface 1.0: An addendum to the Haskell 1998 report, http://www.cse.unsw.edu.au/chak/haskell/ffi/
  6. 6.
    The Glasgow Haskell compiler, http://www.haskell.org/ghc/
  7. 7.
    Harris, T., Marlow, S., Peyton Jones, S.: Haskell on a shared-memory multiprocessor. In: Haskell 2005: Proceedings of the 2005 ACM SIGPLAN workshop on Haskell, pp. 49–61. ACM Press, New York (2005)CrossRefGoogle Scholar
  8. 8.
    Harris, T., Marlow, S., Peyton-Jones, S., Herlihy, M.: Composable memory transactions. In: PPoPP 2005: Proceedings of the tenth ACM SIGPLAN symposium on Principles and practice of parallel programming, pp. 48–60. ACM Press, New York (2005)CrossRefGoogle Scholar
  9. 9.
    Huch, F., Norbisrath, U.: Distributed programming in haskell with ports. In: Mohnen, M., Koopman, P. (eds.) IFL 2000. LNCS, vol. 2011, pp. 107–121. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  10. 10.
    The Haskell interpreter Hugs. http://www.haskell.org/hugs/
  11. 11.
    Peyton Jones, S.: Tackling the awkward squad: monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell. In: Engineering theories of software construction, Marktoberdorf Summer School 2000. NATO ASI Series. IOS Press, Amsterdam (2001)Google Scholar
  12. 12.
    Peyton Jones, S., Gordon, A., Finne, S.: Concurrent Haskell. In: Conference Record of POPL 1996: The 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, St. Petersburg Beach, Florida, 21–24, pp. 295–308 (1996)Google Scholar
  13. 13.
    Marlow, S., Peyton Jones, S., Thaller, W.: Extending the Haskell foreign function interface with concurrency. In: Proceedings of the ACM SIGPLAN workshop on Haskell, Snowbird, Utah, USA, pp. 57–68 (September 2004)Google Scholar
  14. 14.

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Frank Huch
    • 1
  • Frank Kupke
    • 1
  1. 1.Institute of Computer ScienceUniversity of KielKielGermany

Personalised recommendations