The Journal of Functional and Logic Programming the Journal of Functional and Logic Programming Compile-time Pointer Reversal

use journal articles in a variety of ways, limited only as required to insure fair attribution to authors and the journal, and to prohibit use in a competing commercial product. See the journal's World Wide Web site for further details. The Journal of Functional and Logic Programming is a peer-reviewed and electronically published scholarly journal that covers a broad scope of topics from functional and logic programming. In particular, it focuses on the integration of the functional and the logic paradigms as well as their common foundations. Abstract This paper introduces an alternative representation for-terms which has the notable property that the search for the leftmost outermost re-dex 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 cor-rectness as a representation for-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 eeciency.

[1]  Jan Willem Klop,et al.  Comparing Curried and Uncurried Rewriting , 1993, J. Symb. Comput..

[2]  Hugo Herbelin,et al.  A Lambda-Calculus Structure Isomorphic to Gentzen-Style Sequent Calculus Structure , 1994, CSL.

[3]  Alan Jeffrey,et al.  A fully abstract semantics for concurrent graph reduction , 1994, Proceedings Ninth Annual IEEE Symposium on Logic in Computer Science.

[4]  Alan Jeffrey,et al.  A Chemical Abstract Machine for Graph Reduction , 1993, MFPS.

[5]  John Launchbury,et al.  A natural semantics for lazy evaluation , 1993, POPL '93.

[6]  Samson Abramsky,et al.  Handbook of logic in computer science. , 1992 .

[7]  Joyce L. Vedral,et al.  Functional Programming Languages and Computer Architecture , 1989, Lecture Notes in Computer Science.

[8]  Martín Abadi,et al.  Explicit substitutions , 1989, POPL '90.

[9]  Stephen J. Garland,et al.  An Overview of LP, The Larch Power , 1989, RTA.

[10]  Simon L. Peyton Jones,et al.  The spineless G-machine , 1988, LISP and Functional Programming.

[11]  Marko C. J. D. van Eekelen,et al.  CLEAN: A language for functional graph writing , 1987, FPCA.

[12]  Nachum Dershowitz,et al.  Termination of Rewriting , 1987, J. Symb. Comput..