Abstract
This paper introduces a new reduction order for the lambda calculus, called head order. It lends itself to a graph reduction implementation. The head normal form of a lambda expression corresponds closely to K. J. Greene's lazy normal form of his LNF-calculus, that is, the head order normal form will have the same variable (respectively, constant) as head and the same number of arguments as its normal form. In the context of future implementations, the head normal form is also called the head normal form skeleton (respectively, outline). This skeleton is produced first. Then the normal forms of the arguments are obtained and inserted into this skeleton concurrently, since they do not interact anymore. Head order reduction automatically exposes concurrent processes.The procedure for generating a head normal form is described in terms of beta-reduction in-the-large, eta-extension in-the-large, and identity-reduction in-the-large. These in-the-large operations represent a new concept. They take sequences of bindings and/or applications as initial form, and produce a result in-the-large. They comprise a multitude of single reductions (e.g., beta, eta) occurring in a specific pattern.A geometric, visual correspondence is described which pictures the process of obtaining a head normal form in terms of smoothing out a zigzag line (representing a lambda expression). The claim is that this image gives insight into the reduction process of very large lambda expressions. A formal definition is given to the concept of environment, which corresponds to a special zigzag line. An environment lookup corresponds to a selector function applied to a sequence of arguments.Special attention is given to the problem of sharing. It is not generally possible, as opposed to the case of combinators, since an argument may contain free variables. They might get bound erroneously when the argument is substituted. Head order reduction has the advantage of normal order: no argument is reduced unless actually needed. How often an argument is copied depends on the occurrence of free variables and the number of different contexts it is substituted in. The implementation difficulties to make this information available on the run are touched upon.Finally, some preliminary simulation results are reported. A set of lambda expressions was abstracted by K. J. Greene's abstraction algorithm. Then all combinators are expressed in terms of lambda expressions. Normal forms of the abstracted lambda expressions are compared to the normal forms of the original expressions. They are all respectively equal up to eta-conversion. This and a comparison of results obtained by the GMD string reduction machine give a fairly good indication of the correctness of the method.KeywordsNormal FormFree VariableNormal OrderGraph ReductionLambda CalculusThese keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
Published Version
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have