JFLP: Volume 1996, Article 3

The Journal of Functional and Logic Programming

Volume 1996

Article 3

Published by The MIT Press . Copyright 1996 Massachusetts Institute of Technology.

----------------------------------------------------------------

Your institution may already be a subscriber to JFLP. If not, please subscribe for legitimate access to all journal articles.

----------------------------------------------------------------

Compile-Time Pointer Reversal

Simon Brock

13 September 1996

Abstract

This paper introduces an alternative representation for lambda terms which has the notable property that the search for the leftmost outermost redex is restricted to two steps. This is important in the implementation of a lazy functional programming language, as this search consumes time and space. The representation introduced is similar to that resulting from the implementation technique of reversing pointers in the left spine of a term while traversing it, except that here the pointers in the left spine are reversed before reduction. This paper completely develops this new representation, including rigourous proofs of the correctness as a representation for lambda terms and a number of properties, such as the restriction on the search for the next redex. It is shown that the representation can be used with graphs, hence it can be used as the basis for an implementation of a lazy functional language. An implementation is introduced and its performance is compared with a conventional implementation, showing a notable increase in efficiency.
The following versions of the article are available: You can find this article also on the ftp-server of The MIT Press (access may be faster from some sites).

----------------------------------------------------------------

Self citation

    @article{jflp96-03,
      author={Simon Brock},
      title={Compile-Time Pointer Reversal},
      journal={Journal of Functional and Logic Programming},
      volume={1996},
      number={3},
      publisher={The MIT Press},
      month={September},
      year={1996}
    }

----------------------------------------------------------------

*back to* Main page