We derive a simple abstract machine for lazy evaluation of the lambda calculus, starting from Launchbury's natural semantics. Lazy evaluation here means non-strict evaluation with sharing of argument evaluation, that is, call-by-need. The machine we derive is a lazy version of Krivine's abstract machine, which was originally designed for call-by-name evaluation. We extend it with datatype constructors and base values, so the nal machine implements all dynamic aspects of a lazy functional language.
Abstract, The program transformation principle called partial evaluation has interesting applications in compilation and compiler generation. Self-applicable partial evaluators may be used for transforming interpreters into corresponding compilers and even for the generation of compiler generators. This is useful because interpreters are significantly easier to write than compilers, but run much slower than compiled code. A major difficulty in writing compilers (and compiler generators) is the thinking in terms of distinct binding times: run time and compile time (and compiler generation time). The paper gives an introduction to partial evaluation and describes a fully automatic though experimental partial evaluator, called mix, able to generate stand-alone compilers as well as a compiler generator. Mix partially evaluates programs written in Mixwell, essentially a first-order subset of statically scoped pure Lisp. For compiler generation purposes it is necessary that the partial evaluator be self-applicable. Even though the potential utility of a self-applicable partial evaluator has been recognized since 1971, a 1984 version of mix appears to be the first successful implementation. The overall structure of mix and the basic ideas behind its way of working are sketched. Finally, some results of using a version of mix are reported.Since the early 1970s it has been k n o w n that in theory, the p r o g r a m transformation principle called partial evaluation can be used for compiling and compiler generation, and even for the a u t o m a t i c generation o f a compiler generator. A partial evaluator able to generate stand-alone compilers and compiler generators had not, however, been successfully implemented before 1984 when the first mix system was brought to work at the University o f Copenhagen.In this paper we discuss partial evaluation and its applications to compiler generation and sketch the partial evaluator we developed, called the mix system. The results we report are sufficiently r e m a r k a b l e to justify further research into using partial evaluation for compiler generation purposes. We also mention other applications. The description here is essentially a snapshot of the mix system and its applications as of early 1987.A partial evaluator m a y be thought of as a " s m a r t interpreter." If an ordinary interpreter is given a p r o g r a m and only part o f this p r o g r a m ' s input data, it will leave * Current address:
The herbicide glyphosate and inorganic phosphate compete for adsorption sites in soil and on oxides. This competition may have consequences for the transport of both compounds in soil and hence for the contamination of groundwater. We present and evaluate six simple, kinetic models that only take time and concentrations into account. Three of the models were found suitable to describe the competition in soil. These three models all assumed both competitive and additive adsorption, but with different equations used to describe the adsorption. For the oxides, three additional models assuming only competitive adsorption were also found suitable. This is in accordance with the observation that the adsorption in soil is both competitive and additive, whereas the adsorption on oxides is competitive. All models can be incorporated in transport models such as the convection-dispersion equation.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.