Abstract
A new binding model for dynamically scoped functional languages (such as LISP) is presented. The scheme attempts to combine the fast variable access of shallow binding with the functional advantages of deep binding without placing a high cost on context-switching. Tags are used to label the nodes of the environment tree, and this is used to determine whether a given node is an ancestor of the current node, and thus which value of a variable is valid in the current environment. The efficiency of the new method is compared with the classical models (shallow and deep), and then viewed in the light of more recent developments such as the cache-cell system of MDL and Baker's rerooting scheme.
Detalls of the current implementation are described briefly, followed by a discussion of the implications of the model for garbage collection — in particular the need to regenerate tags on the environment tree — and how the scheme will affect the compilation process.
Preview
Unable to display preview. Download preview PDF.
References
Baker H G Shallow binding in LISP 1.5 CACM Jul 1978, Vol 21, pp 565–569
Bobrow D G, Wegbreit B A Model and Stack Implementation of Multiple Environments CACM Oct 1973, Vol 16, pp 591–603
Fitch J P, Norman A C Implementing LISP in a high level language Software Practice and Experience, Vol 7 (1977), pp 713–725
Fitch J P Implementing REDUCE on a microcomputer These Proceedings
Galley S. Pfister G The MDL Programming Language Manual Available from MIT Laboratory for Computer Science
Henderson P, Morris J H A Lazy Evaluator Proceedings 3rd Symposium on Principles of Programming Languages
Marti J B et al. Standard LISP report SIGPLAN Vol 14, No 10, 1978
Fitch J P, Marti J B The Bath Concurrent LISP machine These Proceedings
Marti J B Interprocedural Data Flow analysis of LISP programs In preparation
Padget J A Escaping from intermediate expression swell: a continuing saga Proceedings of EUROCAM-82. Marseille, 1982 Published in Springer Verlag Lecture Notes in Computer Science 144.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1983 Springer-Verlag
About this paper
Cite this paper
Padget, J.A. (1983). The ecology of LISP or the case for the preservation of the environment. In: van Hulzen, J.A. (eds) Computer Algebra. EUROCAL 1983. Lecture Notes in Computer Science, vol 162. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-12868-9_94
Download citation
DOI: https://doi.org/10.1007/3-540-12868-9_94
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-12868-7
Online ISBN: 978-3-540-38756-5
eBook Packages: Springer Book Archive