Results 1 -
2 of
2
An Implementation of Parallel Pattern-matching via Concurrent Haskell
- Australian Computer Science Communications
, 2002
"... Parallel pattern-matching offers the maximum laziness for programs written in lazy functional languages. Function arguments are evaluated concurrently and all arguments are given equal precedence, so functions can return results whenever possible in the presence of errors or infinite computations. W ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
Parallel pattern-matching offers the maximum laziness for programs written in lazy functional languages. Function arguments are evaluated concurrently and all arguments are given equal precedence, so functions can return results whenever possible in the presence of errors or infinite computations. We describe the motivation for and the semantics of parallel pattern-matching. We also describe the first available implementation of Haskell with parallel pattern-matching. The implementation works via a source-to-source translation into Concurrent Haskell, using the existing facilities of GHC to provide the required concurrency. Various transformation techniques are outlined which can help to reduce the degree and cost of the concurrency required to satisfy the semantics.
Optimising Parallel Pattern-matching
"... Parallel pattern-matching (PPM) provides true commutative implementation of functions defined by cases in functional languages, because no argument is given precedence over any other. However, the requirement for concurrency (in general) to support these semantics means that current implementations ..."
Abstract
- Add to MetaCart
Parallel pattern-matching (PPM) provides true commutative implementation of functions defined by cases in functional languages, because no argument is given precedence over any other. However, the requirement for concurrency (in general) to support these semantics means that current implementations incur a significant performance penalty over simple, traditional left-to-right semantics. We describe a source-level program transformation scheme that analyses a PPM definition and is often able to generate an equivalent definition that can be executed without concurrency. Where sequential implementation is not possible, the scheme is sometimes able to generate an equivalent definition that reduces the number of concurrent threads required to execute a definition. This transformation scheme promises to deliver a major improvement in the performance of PPM implementations.

