St Andrews Research Repository

St Andrews University Home
View Item 
  •   St Andrews Research Repository
  • University of St Andrews Research
  • University of St Andrews Research
  • University of St Andrews Research
  • View Item
  •   St Andrews Research Repository
  • University of St Andrews Research
  • University of St Andrews Research
  • University of St Andrews Research
  • View Item
  •   St Andrews Research Repository
  • University of St Andrews Research
  • University of St Andrews Research
  • University of St Andrews Research
  • View Item
  • Register / Login
JavaScript is disabled for your browser. Some features of this site may not work without it.

Finding parallel functional pearls : automatic parallel recursion scheme detection in Haskell functions via anti-unification

Thumbnail
View/Open
Barwell_2017_FGCS_ParallelFunctionalPearls_AAM.pdf (925.5Kb)
Date
02/2018
Author
Barwell, Adam D.
Brown, Christopher
Hammond, Kevin
Funder
European Commission
EPSRC
Grant ID
644235
EP/P020631/1
Keywords
QA75 Electronic computers. Computer science
QA76 Computer software
NDAS
BDC
R2C
~DC~
Metadata
Show full item record
Abstract
This paper describes a new technique for identifying potentially parallelisable code structures in functional programs. Higher-order functions enable simple and easily understood abstractions that can be used to implement a variety of common recursion schemes, such as maps and folds over traversable data structures. Many of these recursion schemes have natural parallel implementations in the form of algorithmic skeletons. This paper presents a technique that detects instances of potentially parallelisable recursion schemes in Haskell 98 functions. Unusually, we exploit anti-unification to expose these recursion schemes from source-level definitions whose structures match a recursion scheme, but which are not necessarily written directly in terms of maps, folds, etc. This allows us to automatically introduce parallelism, without requiring the programmer to structure their code a priori in terms of specific higher-order functions. We have implemented our approach in the Haskell refactoring tool, HaRe, and demonstrated its use on a range of common benchmarking examples. Using our technique, we show that recursion schemes can be easily detected, that parallel implementations can be easily introduced, and that we can achieve real parallel speedups (up to 23 . 79 × the sequential performance on 28 physical cores, or 32 . 93 × the sequential performance with hyper-threading enabled).
Citation
Barwell , A D , Brown , C & Hammond , K 2018 , ' Finding parallel functional pearls : automatic parallel recursion scheme detection in Haskell functions via anti-unification ' , Future Generation Computer Systems , vol. 79 , no. Part 2 , pp. 669-686 . https://doi.org/10.1016/j.future.2017.07.024
Publication
Future Generation Computer Systems
Status
Peer reviewed
DOI
https://doi.org/10.1016/j.future.2017.07.024
ISSN
0167-739X
Type
Journal article
Rights
© 2017 Elsevier Ltd. All rights reserved. This work has been made available online in accordance with the publisher’s policies. This is the author created, accepted version manuscript following peer review and may differ slightly from the final published version. The final published version of this work is available at https://doi.org/10.1016/j.future.2017.07.024
Description
This work has been partially supported by the EU H2020 grant “RePhrase: Refactoring Parallel Heterogeneous Resource-Aware Applications–a Software Engineering Approach” (ICT-644235), by COST Action IC1202 (TACLe), supported by COST (European Cooperation in Science and Technology) , by EPSRC grant “Discovery: Pattern Discovery and Program Shaping for Manycore Systems” (EP/P020631/1), and by Scottish Enterprise PS7305CA44.
Collections
  • University of St Andrews Research
URL
https://authors.elsevier.com/c/1W557,3q5xOX20
URI
http://hdl.handle.net/10023/15729

Items in the St Andrews Research Repository are protected by copyright, with all rights reserved, unless otherwise indicated.

Advanced Search

Browse

All of RepositoryCommunities & CollectionsBy Issue DateNamesTitlesSubjectsClassificationTypeFunderThis CollectionBy Issue DateNamesTitlesSubjectsClassificationTypeFunder

My Account

Login

Open Access

To find out how you can benefit from open access to research, see our library web pages and Open Access blog. For open access help contact: openaccess@st-andrews.ac.uk.

Accessibility

Read our Accessibility statement.

How to submit research papers

The full text of research papers can be submitted to the repository via Pure, the University's research information system. For help see our guide: How to deposit in Pure.

Electronic thesis deposit

Help with deposit.

Repository help

For repository help contact: Digital-Repository@st-andrews.ac.uk.

Give Feedback

Cookie policy

This site may use cookies. Please see Terms and Conditions.

Usage statistics

COUNTER-compliant statistics on downloads from the repository are available from the IRUS-UK Service. Contact us for information.

© University of St Andrews Library

University of St Andrews is a charity registered in Scotland, No SC013532.

  • Facebook
  • Twitter