|
ABSTRACT
A systematic approach is given for deriving incremental programs that exploit caching. The cache-and-prune method presented in the article consists of three stages: (I) the original program is extended to cache the results of all its intermediate subcomputations as well as the final result, (II)) the extended program is incrementalized so that computation on a new input can use all intermediate results on an old input, and (III) unused results cached by the extended program and maintained by the incremental program are pruned away, leaving a pruned extended program that caches only useful intermediate results and a pruned incremental program that uses and maintains only useful results. All three stages utilize static analyses and semantics-preserving transformations. Stages I and III are simple, clean, and fully automatable. The overall method has a kind of optimality with respect to the techniques used in Stage II. The method can be applied straightfowardly to provide a systematic approach to program improvement via caching.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
 |
1
|
Martín Abadi , Butler Lampson , Jean-Jacques Lévy, Analysis and caching of dependencies, Proceedings of the first ACM SIGPLAN international conference on Functional programming, p.83-91, May 24-26, 1996, Philadelphia, Pennsylvania, United States
|
| |
2
|
|
| |
3
|
Alfred V. Aho , Ravi Sethi , Jeffrey D. Ullman, Compilers: principles, techniques, and tools, Addison-Wesley Longman Publishing Co., Inc., Boston, MA, 1986
|
| |
4
|
ALLEN, F. E. 1969. Program optimization. In Annual Review of Automatic Programming. Vol. 5. Pergamon Press, New York, 239-307.
|
| |
5
|
ALLEN, F. E., COCKE, J., AND KENNEDY, I~. 1981. Reduction of operator strength. In Program Flow Analysis, S. S. Muchnick and N. D. Jones, Eds. Prentice-HM1, Englewood Cliffs, N.J., 79-101.
|
 |
6
|
|
 |
7
|
|
 |
8
|
|
 |
9
|
|
| |
10
|
|
 |
11
|
|
| |
12
|
|
 |
13
|
|
 |
14
|
|
| |
15
|
|
| |
16
|
|
| |
17
|
EARLEY, J. 1976. High level iterators and a method for automatically designing data structure representation. J. Cornput. Lang. 1, 321-342.
|
| |
18
|
|
| |
19
|
|
| |
20
|
HALL, R. J. 1991. Program improvement by automatic redistribution of intermediate results: An overview. In Automating Software Design, M. R. Lowry and R. D. McCartney, Eds. AAAI Press/The MIT Press, 339-372.
|
 |
21
|
|
| |
22
|
|
| |
23
|
|
| |
24
|
|
 |
25
|
|
 |
26
|
|
 |
27
|
|
| |
28
|
KLEENE, S. C. 1952. Introduction to Metarnathernatics. Van Nostrand, New York. 10th reprint, Wolters-Noordhoff Publishing, Groningen and North-Holland Publishing Company, Amsterdam, 1991.
|
| |
29
|
KNUTH, D. E. 1968. Semantics of context-free languages. Math. Syst. Theory 2, 2 (June), 127-145.
|
| |
30
|
LAUNCHBURY, J. 1989. Projection factorisations in partial evaluation. Ph.D. thesis, Department of Computing, University of Glasgow, Glasgow, Scotland.
|
 |
31
|
|
 |
32
|
|
| |
33
|
|
| |
34
|
|
| |
35
|
|
| |
36
|
|
| |
37
|
|
 |
38
|
Yanhong A. Liu , Scott D. Stoller , Tim Teitelbaum, Discovering auxiliary information for incremental computation, Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.157-170, January 21-24, 1996, St. Petersburg Beach, Florida, United States
[doi> 10.1145/237721.237769]
|
| |
39
|
MICHIE, D. 1968. "memo" functions and machine learning. Nature 218, 19-22.
|
 |
40
|
|
| |
41
|
MOSTOW, D. J. AND COHEN, D. 1985. Automating program speedup by deciding what to cache. In Proceedings of the 9th International Joint Conference on Artificial Intelligence. Morgan Kaufmann Publishers, San Francisco, Calif., 165-172.
|
 |
42
|
|
 |
43
|
|
| |
44
|
|
| |
45
|
|
 |
46
|
|
| |
47
|
|
 |
48
|
|
| |
49
|
|
| |
50
|
|
| |
51
|
PLOTKIN, G. D. 1975. Call-by-name, call-by-value and the h-calculus. Theoret. Comput. Sci. 1, 125-159.
|
 |
52
|
|
 |
53
|
|
| |
54
|
|
| |
55
|
|
| |
56
|
|
 |
57
|
|
 |
58
|
|
| |
59
|
SCOTT, D. S. 1982. Lectures on a mathematical theory of computation. In Theoretical Foundations of Programming Methodology, M. Broy and G. Schmidt, Eds. D. Reidel Publishing Company, 145-292.
|
| |
60
|
|
 |
61
|
|
 |
62
|
|
| |
63
|
|
| |
64
|
|
| |
65
|
|
 |
66
|
|
| |
67
|
|
 |
68
|
|
 |
69
|
|
| |
70
|
|
 |
71
|
|
| |
72
|
|
| |
73
|
|
CITED BY 24
|
|
Bradley T. Vander Zanden , Richard Halterman , Brad A. Myers , Rich McDaniel , Rob Miller , Pedro Szekely , Dario A. Giuse , David Kosbie, Lessons learned about one-way, dataflow constraints in the Garnet and Amulet graphical toolkits, ACM Transactions on Programming Languages and Systems (TOPLAS), v.23 n.6, p.776-796, November 2001
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
INDEX TERMS
Primary Classification:
D.
Software
D.3
PROGRAMMING LANGUAGES
D.3.4
Processors
Subjects:
Optimization
Additional Classification:
D.
Software
D.3
PROGRAMMING LANGUAGES
F.
Theory of Computation
F.3
LOGICS AND MEANINGS OF PROGRAMS
I.
Computing Methodologies
I.2
ARTIFICIAL INTELLIGENCE
I.2.2
Automatic Programming
Subjects:
Program transformation;
Automatic analysis of algorithms
General Terms:
Algorithms,
Languages,
Performance
Keywords:
caching,
dependence analysis,
incremental computation,
incremental programs,
intermediate results,
memoization,
optimization,
program efficiency improvement,
program transformation,
static analysis
REVIEW
"Pierre Jouvelot : Reviewer"
Recursive programs such as the Fibonacci function induce redundant
subexpression evaluations at run time. Caching of the intermediate
values of subexpressions is a natural tradeoff mechanism that
potentially decreases the overall program runni
more...
|