Incremental computation via function caching
Incremental computation via function caching
复制标题
通过函数缓存进行增量计算
DOI:
10.1145/75277.75305
复制
发表时间:
1989
期刊:
影响因子:
--
通讯作者:
T. Teitelbaum
中科院分区:
文献类型:
--
作者:
W. Pugh;T. Teitelbaum
IncrementaZ computafim is the technique of efficiently updating the result of a computation when the input is changed. This idea is used in doing semantic checking in programming environments, document formatting in WYSIWYG editors and many other applications. From a different perspective, incremental computation concerns the efficient on-line computation of flx&j&),... wheref is some program and xo, xl,... is a sequence of input values, each differing from its predecessor only slightly. It is possible to achieve incremental computation by writing an explicitly incremental algorithm-an algorithm that not only specifies how to compute the output from the input, but also specifies how to update the output when the input changes. This can be difficult and error-prone, so when possible we would prefer to use an incremental evaluator-an evaluator that uses just a description of how to compute the output from the input and is responsible for determining how to update the output correctly and efficiently when the input changes. Incremental attribute grammar evaluation and incremental dependency graph evaluation have proven to be useful and efficient paradigms for producing incremental evaluators (DRT811 [Rep821 IRep841 [Ho0861 IHT861 [ACR+ 871 [Hoo871 fYS881. Unfortunately, they are only suitable for certain kinds of problems. For example, while it it possible to use such techniques for incremental proof verification [RA841, it seems impossible to use these techniques for incremental theorem proving. We present a new paradigm for incremental evaluation based on function caching that works well in some situations for which incremental attribute grammar evaluation and incremental dependency graph evaluation techniques are unusable. Our paradigm also works reasonably well in many of those situations best suited for incremental attribute grammar evaluation and incremental dependency graph evaluation. We give a comparison of our techniques and Reps’s optimal incremental attribute grammar algorithm in Section 7.