Implicit and Explicit Parallel Programming in Haskell (1993)
| Citations: | 29 - 1 self |
BibTeX
@TECHREPORT{Jones93implicitand,
author = {Mark P. Jones and Paul Hudak},
title = {Implicit and Explicit Parallel Programming in Haskell},
institution = {},
year = {1993}
}
Years of Citing Articles
OpenURL
Abstract
It has often been suggested that functional languages provide an excellent basis for programming parallel computer systems. This is largely a result of the lack of side effects which makes it possible to evaluate the subexpressions of a given term without any risk of interference. On the other hand, the lack of side-effects has also been seen as a weakness of functional languages since it rules out many features of traditional imperative languages such as state, I/O and exceptions. These ideas can be simulated in a functional language but the resulting programs are sometimes unnatural and inefficient. On the bright side, recent work has shown how many of these features can be naturally incorporated into a functional language without compromising efficiency by expressing computations in terms of monads or continuations. Unfortunately, the “single-threading” implied by these techniques often destroys many opportunities for parallelism. In this paper, we describe a simple extension to the Haskell I/O monad that allows a form of explicit high-level concurrency. It is a simple matter to incorporate these features in a sequential implementation, and genuine parallelism can be obtained on a parallel machine. In addition, the inclusion of constructs for explicit concurrency enhances the use of Haskell as an executable specification language, since some programs are most naturally described as a composition of parallel processes. ∗ This research was supported by ARPA via a subcontract to Intermetrics, Inc. 1 1







