pith. sign in

arxiv: 1312.0658 · v1 · pith:J75XWBZLnew · submitted 2013-12-02 · 💻 cs.PL

A Theory of Changes for Higher-Order Languages - Incrementalizing {λ}-Calculi by Static Differentiation

classification 💻 cs.PL
keywords programchangestransformationcalculicomputationderivativederivativesincrementalize
0
0 comments X
read the original abstract

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 {\lambda}-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.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.