首页> 外文期刊>Future generation computer systems >Finding parallel functional pearls: Automatic parallel recursion scheme detection in Haskell functions via anti-unification
【24h】

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

机译:寻找并行功能的珍珠:通过反统一在Haskell函数中自动进行并行递归方案检测

获取原文
获取原文并翻译 | 示例

摘要

AbstractThis paper describes a new technique for identifying potentially parallelisable code structures in functional programs.Higher-order functionsenable simple and easily understood abstractions that can be used to implement a variety of commonrecursion schemes, such asmapsandfoldsover traversable data structures. Many of these recursion schemes have natural parallel implementations in the form ofalgorithmic skeletons. This paper presents a technique that detects instances of potentially parallelisable recursion schemes in Haskell 98 functions. Unusually, we exploitanti-unificationto expose these recursion schemes from source-level definitions whose structures match a recursion scheme, but which are not necessarily written directly in terms ofmaps,folds, etc. This allows us to automatically introduce parallelism, without requiring the programmer to structure their codea prioriin 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 to23.79×the sequential performance on 28 physical cores, or32.93×the sequential performance with hyper-threading enabled).HighlightsWe present a technique using anti-unification to discover recursion schemes in Haskell functions.We present a new, specialised anti-unification algorithm.We have implemented our approach using the Haskell refactoring tool HaRe.We have demonstrated our approach on a range of standard examples.Our technique is in principle completely general, able to discover arbitrary patterns in code.
机译: 摘要 本文介绍了一种用于识别函数程序中潜在可并行化代码结构的新技术。高阶函数启用简单易懂的抽象,可用于实现各种常见的递归方案,例如地图折叠在可遍历的数据结构上。这些递归方案中有许多以算法框架的形式具有自然并行实现。本文提出了一种检测Haskell 98函数中潜在可并行化递归方案实例的技术。通常,我们利用 anti-unification 从结构与递归方案匹配的源级别定义中公开这些递归方案,但不一定直接用来编写映射折叠等。这使我们能够自动引入并行性,而无需程序员先构建其代码先验在特定的高阶函数方面。我们已经在Haskell重构工具HaRe中实现了我们的方法,并在一系列常见的基准测试示例中演示了该方法的使用。使用我们的技术,我们证明了可以很容易地检测出递归方案,可以轻松地引入并行实现,并且可以实现真正的并行加速(最高可达 23 79 × 在28上的顺序性能物理核心,或者 32 93 × 启用超线程的顺序性能)。 突出显示 我们提出了一种技术使用反统一发现Haskell函数中的递归方案。 我们提出了一种新的专用反统一算法。 我们已经使用Haskell重构实现了我们的方法工具HaRe。 我们已经在一系列标准示例中演示了我们的方法。 我们的技术原则上是完全通用的,能够发现合作伙伴中的任意模式de。

著录项

  • 来源
    《Future generation computer systems》 |2018年第2期|669-686|共18页
  • 作者单位

    School of Computer Science, University of St Andrews, St Andrews;

    School of Computer Science, University of St Andrews, St Andrews;

    School of Computer Science, University of St Andrews, St Andrews;

  • 收录信息 美国《科学引文索引》(SCI);美国《工程索引》(EI);
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号