Selective Memoization
Preprint
Abstract
This paper presents language techniques for applying memoization selectively. The techniques provide programmer control over equality, space usage, and identification of precise dependences so that memoization can be applied according to the needs of an application. Two key properties of the approach are that it accepts and efficient implementation and yields programs whose performance can be analyzed using standard analysis techniques. We describe our approach in the context of a functional language called MFL and an implementation as a Standard ML library. The MFL language employs a modal type system to enable the programmer to express programs that reveal their true data dependences when executed. We prove that the MFL language is sound by showing that that MFL programs yield the same result as they would with respect to a standard, non-memoizing semantics. The SML implementation cannot support the modal type system of MFL statically but instead employs run-time checks to ensure correct usage of primitives.Keywords
All Related Versions
This publication has 8 references indexed in Scilit:
- An experimental analysis of self-adjusting computationACM Transactions on Programming Languages and Systems, 2009
- A judgmental reconstruction of modal logicMathematical Structures in Computer Science, 2001
- Static caching for incremental computationACM Transactions on Programming Languages and Systems, 1998
- Incremental computation via function caching1989
- Eliminating Redundant Recursive Calls.ACM Transactions on Programming Languages and Systems, 1983
- Tabulation Techniques for Recursive ProgramsACM Computing Surveys, 1980
- An example of hierarchical design and proofCommunications of the ACM, 1978
- Elimination of recursive calls using a small table of “randomly” selected function valuesBIT Numerical Mathematics, 1976