Incremental computation via function caching
POPL '89 Proceedings of the 16th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Introduction to algorithms
Caching function calls using precise dependencies
PLDI '00 Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation
POPL '03 Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A judgmental reconstruction of modal logic
Mathematical Structures in Computer Science
Techniques for automatic memoization with applications to context-free parsing
Computational Linguistics
A modal type system for multi-level generating extensions with persistent code
Proceedings of the 8th ACM SIGPLAN international conference on Principles and practice of declarative programming
Some Remarks on Type Systems for Course-of-value Recursion
Electronic Notes in Theoretical Computer Science (ENTCS)
Logical mobility and locality types
LOPSTR'04 Proceedings of the 14th international conference on Logic Based Program Synthesis and Transformation
Hi-index | 0.00 |
Memoization is a useful technique to eliminate computational redundancy. A memo function remembers all the arguments to which it has been applied, together with their corresponding results, by storing them in a table. This table is consulted before each functional call to determine if the particular argument is in it. If so, the call is skipped and the stored result is returned; otherwise the call is performed and its result added to the table. Acar, Belloch and Harper present a framework to apply memoization selectively, that is, enabling the programmer to determine precisely the dependences between the input and the result of a function. This framework is efficient and yields programs whose performance can be analyzed using standard techniques. The language, implemented as an SML library, is based on a modal type system which allows the programmer to reveal the true data input/output dependences in a program. However, the modality seems to be an ad-hoc choice for the implementation. In this paper we develop selective memoization, using instead box types, corresponding to the necessitation modality @?. We also include non-memoized functions, and provide full proofs of type safeness and soundness of the dynamic semantics with respect to an effect-free system which is later translated into the very well-known language PCF.