高阶语言的变化理论--用静态微分增量化λ演算
A Theory of Changes for Higher-Order Languages - Incrementalizing λ-Calculi by Static Differentiation
摘要:
如果一个昂贵的计算的结果被输入的一个小变化所无效,旧的结果应该被增量地更新,而不是重新执行整个计算。我们通过它们的衍生物来增加程序。派生程序将程序输入的变化直接映射到程序输出的变化,而不需要重新执行原始程序。我们提出了一个程序转换程序的衍生物,这是完全静态和自动的,支持一流的功能,并产生衍生物服从标准优化。我们证明了在Agda中对于一族简单类型的λ演算的程序转换是正确的,这些演算由基类型和原语参数化。一个精确的接口指定了增量化所选原语所需的内容。我们调查性能的案例研究:我们在Scala实现的程序转换,一个插件,并提高性能的一个重要的程序的数量级。
英文摘要:
If the result of an expensive computation is invalidated by a small change to the input, the old result should be updated incrementally instead of reexecuting the whole computation. We incrementalize programs through their derivative. A derivative maps changes in the program's input directly to changes in the program's output, without reexecuting the original program. We present a program transformation taking programs to their derivatives, which is fully static and automatic, supports first-class functions, and produces derivatives amenable to standard optimization. We prove the program transformation correct in Agda for a family of simply-typed λ-calculi, parameterized by base types and primitives. A precise interface specifies what is required to incrementalize the chosen primitives. We investigate performance by a case study: We implement in Scala the program transformation, a plugin and improve performance of a nontrivial program by orders of magnitude.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。