Incremental computing

Incremental computing, also known as incremental computation, is a software feature which, whenever a piece of data changes, attempts to save time by only recomputing those outputs which depend on the changed data.

For example, a spreadsheet software package might use incremental computation in its recalculation features, to update only those cells containing formulas which depend (directly or indirectly) on the changed cells.

The figure shows the relationship between program P, the change calculation function ΔP, which constitutes the core of the incremental program, and a pair of inputs and outputs, I1, O1 and I2, O2.

Specialized approaches require the programmer to explicitly specify the algorithms and data structures that will be used to preserve unchanged sub-calculations.

General-purpose approaches, on the other hand, use language, compiler, or algorithmic techniques to give incremental behavior to otherwise non-incremental programs.

Paige has written down a list of rules for formal differentiation of programs in SUBSETL.

[5] In database systems such as DBToaster, views are defined with relational algebra.

Incremental view maintenance statically analyzes relational algebra to create update rules that quickly maintain the view in the presence of small updates, such as insertion of a row.

[7] Partial evaluation can be seen as a method for automating the simplest possible case of incremental computing, in which an attempt is made to divide program data into two categories: that which can vary based on the program's input, and that which cannot (and the smallest unit of change is simply "all the data that can vary").

In some cases, complete reevaluation of a system is semantically equivalent to incremental evaluation, and may be more efficient in practice if not in theory.

Incremental computing provides a means of computing a new input/output pair (I2,O2), based on an old input output pair (I1,O1). The key technique is represented by a function ΔP, which relates changes in the input to changes to the output.
Incremental computing derives a new input/output pair from one or more old input/output relationships. To do so, ΔP must relate a change in the input to a change in the output. The consumer of the result may be interested in the full updated output, or the delta output, or both.