The ecology of LISP or the case for the preservation of the environment
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.
KeywordsCurrent Frame Garbage Collection Environment Tree Current Environment Functional Object
Unable to display preview. Download preview PDF.
- [Baker78]Baker H G Shallow binding in LISP 1.5 CACM Jul 1978, Vol 21, pp 565–569Google Scholar
- [Bobrow&Wegbreit73]Bobrow D G, Wegbreit B A Model and Stack Implementation of Multiple Environments CACM Oct 1973, Vol 16, pp 591–603Google Scholar
- [Fitch&Norman77]Fitch J P, Norman A C Implementing LISP in a high level language Software Practice and Experience, Vol 7 (1977), pp 713–725Google Scholar
- [Fitch83]Fitch J P Implementing REDUCE on a microcomputer These ProceedingsGoogle Scholar
- [Galley&Pfister75]Galley S. Pfister G The MDL Programming Language Manual Available from MIT Laboratory for Computer ScienceGoogle Scholar
- [Henderson&Morris76]Henderson P, Morris J H A Lazy Evaluator Proceedings 3rd Symposium on Principles of Programming LanguagesGoogle Scholar
- [Marti78]Marti J B et al. Standard LISP report SIGPLAN Vol 14, No 10, 1978Google Scholar
- [Fitch&Marti83]Fitch J P, Marti J B The Bath Concurrent LISP machine These ProceedingsGoogle Scholar
- [Marti-unpublished]Marti J B Interprocedural Data Flow analysis of LISP programs In preparationGoogle Scholar
- [Padget82]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.Google Scholar