Abstract

Abstract Parallel reduction is a major component of parallel programming and widely used for summarisation and aggregation. It is not well understood, however, what sorts of non-trivial summarisations can be implemented as parallel reductions. This paper develops a calculus named λAS, a simply typed lambda calculus with algebraic simplification. This calculus provides a foundation for studying a parallelisation of complex reductions by equational reasoning. Its key feature is δ abstraction. A δ abstraction is observationally equivalent to the standard λ abstraction, but its body is simplified before the arrival of its arguments using algebraic properties such as associativity and commutativity. In addition, the type system of λAS guarantees that simplifications due to δ abstractions do not lead to serious overheads. The usefulness of λAS is demonstrated on examples of developing complex parallel reductions, including those containing more than one reduction operator, loops with conditional jumps, prefix sum patterns and even tree manipulations.

Highlights

  • Functional programming is commonly regarded as a promising approach in parallel programming

  • Functional programming makes parallel programming easy and intuitive. Another benefit of using functional programs in parallel programming is equational reasoning, which helps certify the correctness of parallel implementations

  • Several parallel implementations of reduction-related computations are developed by introducing δ abstractions, and their correctness is checked by equational reasoning

Read more

Summary

Introduction

Functional programming is commonly regarded as a promising approach in parallel programming. In the following recursive Fibonacci function: fib n = if n ≤ 1 1 else fib (n − 1) + fib (n − 2). It is syntactically clear that the two recursive calls, fib (n − 1) and fib (n − 2), can be simultaneously evaluated. For this reason, functional programming makes parallel programming easy and intuitive. Consider the following parallel implementation of the fib function in Haskell: fib n = if n ≤ 1 1 else par x (pseq y (x + y)) where x = fib (n − 1) y = fib (n − 2)

Morihata
Flavour of λas
Parallel list reduction
Conditional
Beyond list processing
Preliminaries
Syntax and operational semantics
Type system
Non-commutative semiring
Multiplication without associativity
More than one semiring
Delimited continuation for introducing more δ abstractions
Related work
Conclusion and future work
Inferring evaluation costs
Strategy for introducing parallelism
Compilation to existing calculus
Parallelisation of practical programs
Conflict of Interest
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call