## Memoization in type-directed partial evaluation (2002)

### Cached

### Download Links

- [www.pps.jussieu.fr]
- [www.pps.univ-paris-diderot.fr]
- [www.pps.jussieu.fr]
- [www.brics.dk]
- [www.brics.dk]
- DBLP

### Other Repositories/Bibliography

Venue: | PROCEEDINGS OF THE 2002 ACM SIGPLAN/SIGSOFT CONFERENCE ON GENERATIVE PROGRAMMING AND COMPONENT ENGINEERING, NUMBER 2487 IN LECTURE NOTES IN COMPUTER SCIENCE |

Citations: | 14 - 6 self |

### BibTeX

@INPROCEEDINGS{Balat02memoizationin,

author = {Vincent Balat and Olivier Danvy},

title = {Memoization in type-directed partial evaluation},

booktitle = {PROCEEDINGS OF THE 2002 ACM SIGPLAN/SIGSOFT CONFERENCE ON GENERATIVE PROGRAMMING AND COMPONENT ENGINEERING, NUMBER 2487 IN LECTURE NOTES IN COMPUTER SCIENCE},

year = {2002},

pages = {78--92},

publisher = {Springer-Verlag}

}

### Years of Citing Articles

### OpenURL

### Abstract

We use a code generator—type-directed partial evaluation— to verify conversions between isomorphic types, or more precisely to verify that a composite function is the identity function at some complicated type. A typed functional language such as ML provides a natural support to express the functions and type-directed partial evaluation provides a convenient setting to obtain the normal form of their composition. However, off-the-shelf type-directed partial evaluation turns out to yield gigantic normal forms. We identify that this gigantism is due to redundancies, and that these redundancies originate in the handling of sums, which uses delimited continuations. We successfully eliminate these redundancies by extending type-directed partial evaluation with memoization capabilities. The result only works for pure functional programs, but it provides an unexpected use of code generation and it yields orders-of-magnitude improvements both in time and in space for type isomorphisms.