paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Generic functional parallel algorithms: scan and FFT

泛型函数式并行算法:scan 与 FFT
ICFP 1(ICFP)2017匹配度 1/10 · 该论文属于函数式编程中的泛型并行算法推导(parallel scan 与 FFT 的无数组表达),既不涉及静态分析、LLM/Agent 程序,也不涉及浮点程序分析与贝叶斯程序分析,与用户研究方向几乎没有交集。FFT 虽为数值算法,但本文关注的是类型构造层面的泛型表达,而非浮点误差或数值正确性分析。引用 7 inbox
Conal Elliott
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:用和、积与复合等泛型构造统一表达并行 scan 和 FFT,无需数组并揭示算法共性。

并行编程(无论命令式还是函数式)长期以数组为核心数据类型,而类型化函数式编程探索了列表、树等多种结构。本文提出面向并行扫描(广义前缀和)与快速傅里叶变换(FFT)的泛型函数式表述。方法上,将数据类型分解为和、积、复合及其单位等少量基本构造,并在此之上定义算法,使其自动适配无限多种数据类型;数组在其中不扮演角色。得益是更简单、更可组合的风格,复用常见代数模式,避免运行期索引错误,并清晰揭示原本差异很大的算法之间的深层共性。实例化这些泛型表述后,并行 scan 与 FFT 各自自然产生两个已知算法,另有两个可能的新算法。

问题
并行编程通常以数组为中心,而函数式编程中列表、树等丰富数据类型缺少统一的并行算法表述;论文关注如何用泛型方式表达并行 scan 与 FFT,并避免数组索引及其错误。
方法
将数据类型分解为和、积、复合及其单位等基本构造,在泛型函数式风格中定义 scan 与 FFT,使算法可自动实例化到多种数据类型;不依赖数组。
评估
评估方式并非实验基准,而是通过实例化泛型表述,展示并行 scan 与 FFT 各自导出两个已知算法以及两个可能的新算法,并说明更可组合、免运行时索引错误等优势。
原文摘要(Abstract)

Parallel programming, whether imperative or functional, has long focused on arrays as the central data type. Meanwhile, typed functional programming has explored a variety of data types, including lists and various forms of trees. Generic functional programming decomposes these data types into a small set of fundamental building blocks: sum, product, composition, and their associated identities. Definitions over these few fundamental type constructions then automatically assemble into algorithms for an infinite variety of data types—some familiar and some new. This paper presents generic functional formulations for two important and well-known classes of parallel algorithms: parallel scan (generalized prefix sum) and fast Fourier transform (FFT). Notably, arrays play no role in these formulations. Consequent benefits include a simpler and more compositional style, much use of common algebraic patterns and freedom from possibility of run-time indexing errors. The functional generic style also clearly reveals deep commonality among what otherwise appear to be quite different algorithms. Instantiating the generic formulations, two well-known algorithms for each of parallel scan and FFT naturally emerge, as well as two possibly new algorithms.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@article{Elliott17,
  title = {Generic functional parallel algorithms: scan and FFT},
  author = {Conal Elliott},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {1},
  number = {ICFP},
  year = {2017},
  doi = {10.1145/3110251}
}