Making a faster Curry with extensional types

Making a faster Curry with extensional types
复制标题

使用扩展类型制作更快的 Curry

DOI:
10.1145/3331545.3342594
复制
发表时间:
2019
期刊:
ACM SIGPLAN International Symposium on Haskell
影响因子:
--
通讯作者:
Peyton Jones, Simon
Peyton Jones, Simon
中科院分区:
--
文献类型:
--
作者:
Downen, Paul;Sullivan, Zachary;Ariola, Zena M.;Peyton Jones, Simon

文献摘要

参考文献

被引文献

相似文献

咖喱函数显然一次只接受一个参数,这很慢。因此,针对高阶语言的优化编译器总是有一些机制,可以通过一次传递几个参数来解决问题,这是函数可以处理的尽可能多的参数,这就是所谓的自变量。但这种机制通常是临时的,在更高阶的函数中根本不起作用。我们展示了扩展的、按名称调用的函数如何具有正确的行为来直接表示Curry函数的多样性。这些扩展函数可以与实用编程语言原生的函数并行,后者不使用按名称调用求值。在同一种中间语言中,按名称调用与其他求值策略相结合,表达了函数类型的特殊性,并对多论元咖喱函数进行了原则性和构成性的描述。一个意想不到但意义重大的好处是,我们的方法同样适用于按值调用语言和按需调用语言,并且可以很容易地集成到现有的编译框架中。
Curried functions apparently take one argument at a time, which is slow. So optimizing compilers for higher-order languages invariably have some mechanism for working around currying by passing several arguments at once, as many as the function can handle, which is known as itsarity. But such mechanisms are often ad-hoc, and do not work at all in higher-order functions. We show how extensional, call-by-name functions have the correct behavior for directly expressing the arity of curried functions. And these extensional functions can stand side-by-side with functions native to practical programming languages, which do not use call-by-name evaluation. Integrating call-by-name with other evaluation strategies in the same intermediate language expresses the arity of a function in its type and gives a principled and compositional account of multi-argument curried functions. An unexpected, but significant, bonus is that our approach is equally suitable for a call-by-value language and a call-by-need language, and it can be readily integrated into an existing compilation framework.
快速柯里化:push/enter 与 eval/apply 用于高阶语言
DOI: --
发表时间: 2004
期刊: ACM SIGPLAN International Conference on Functional Programming
影响因子: --
作者:
S. Marlow;S. Jones
通讯作者: S. Jones
类型正在调用约定
DOI: 10.1145/1596638.1596640
发表时间: 2009
期刊: Sigplan Notices
影响因子: --
作者:
Maximilian Bolingbroke;S. Jones
通讯作者: S. Jones
DOI: --
发表时间: 2013
期刊:
影响因子: --
作者:
Guillaume Munch
通讯作者: Guillaume Munch
工作笔记
DOI: --
发表时间: 2007
期刊:
影响因子: --
作者:
M. Menon
通讯作者: M. Menon
理论与实践中的模块化、高阶基数分析
DOI: 10.1145/2535838.2535861
发表时间: 2014
期刊: Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
影响因子: --
作者:
Ilya Sergey;Dimitrios Vytiniotis;S. Jones
通讯作者: S. Jones