A protocol for generalized occam
Software—Practice & Experience
Higher-order concurrency
Imperative functional programming
POPL '93 Proceedings of the 20th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A calculus of mobile processes, II
Information and Computation
Functional programming and input/output
Functional programming and input/output
POPL '96 Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Concurrent programming in ML
An Effective Implementation for the Generalized Input-Output Construct of CSP
ACM Transactions on Programming Languages and Systems (TOPLAS)
Communicating sequential processes
Communications of the ACM
Events in Haskell, and how to implement them
Proceedings of the sixth ACM SIGPLAN international conference on Functional programming
First-class Synchronous Operations
TPPP '94 Proceedings of the International Workshop on Theory and Practice of Parallel Programming
A Distributed Protocol for Channel-Based Communication with Choice
PARLE '92 Proceedings of the 4th International PARLE Conference on Parallel Architectures and Languages Europe
From pi-Calculus to Higher-Order pi-Calculus - and Back
TAPSOFT '93 Proceedings of the International Joint Conference CAAP/FASE on Theory and Practice of Software Development
Protocols for Non-Deterministic Communication over Synchronous Channels
IPPS '98 Proceedings of the 12th. International Parallel Processing Symposium on International Parallel Processing Symposium
Kill-safe synchronization abstractions
Proceedings of the ACM SIGPLAN 2004 conference on Programming language design and implementation
Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming
Proceedings of the 13th ACM SIGPLAN international conference on Functional programming
A fair protocol for non-deterministic message passing
Proceedings of the Third C* Conference on Computer Science and Software Engineering
Combinators for message-passing in Haskell
PADL'11 Proceedings of the 13th international conference on Practical aspects of declarative languages
Composable asynchronous events
Proceedings of the 32nd ACM SIGPLAN conference on Programming language design and implementation
Run your research: on the effectiveness of lightweight mechanization
POPL '12 Proceedings of the 39th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Hi-index | 0.00 |
In Concurrent ML, synchronization abstractions can be defined and passed as values, much like functions in ML. This mechanism admits a powerful, modular style of concurrent programming, called higher-order concurrent programming. Unfortunately, it is not clear whether this style of programming is possible in languages such as Concurrent Haskell, that support only first-order message passing. Indeed, the implementation of synchronization abstractions in Concurrent ML relies on fairly low-level, language-specific details. In this paper we show, constructively, that synchronization abstractions can be supported in a language that supports only first-order message passing. Specifically, we implement a library that makes Concurrent ML-style programming possible in Concurrent Haskell. We begin with a core, formal implementation of synchronization abstractions in the π-calculus. Then, we extend this implementation to encode all of Concurrent ML's concurrency primitives (and more!) in Concurrent Haskell. Our implementation is surprisingly efficient, even without possible optimizations. In several small, informal experiments, our library seems to outperform OCaml's standard library of Concurrent ML-style primitives. At the heart of our implementation is a new distributed synchronization protocol that we prove correct. Unlike several previous translations of synchronization abstractions in concurrent languages, we remain faithful to the standard semantics for Concurrent ML's concurrency primitives. For example, we retain the symmetry of choose, which can express selective communication. As a corollary, we establish that implementing selective communication on distributed machines is no harder than implementing first-order message passing on such machines.