Transforming Lazy Functions using Comportment Properties

Ross Paterson. In PLILP, Southampton, UK, September 1997, LNCS vol. 1292, pages 111-125.


This paper develops a source-to-source transformation that seeks to delay the creation of thunks as much as possible, often eliminating them altogether. The generated programs make use of simpler representations, including types in which all expressions terminate. The transformation is guided by an abstract interpretation, with the abstract values of basic comportment analysis concretized as representation types related by injections.

The transformation of functions is polyvariant, with functions mapped to natural transformations. This leads to a clean treatment of higher order functions.


gzipped PostScript, gzipped DVI, BibTeX.