Dynamic optimization of covered tail recursive functions in applicative languages

Within the last years, the interest in efficient implementations of high level interpreter-based applicative languages has increased considerably, both in the areas of software engineering and artificial intelligence. Further, a preference for static scope languages can be observed. This paper presents an optimization technique for interpreters of such languages, taking an implementation of LISP as an example. First the technique of shallow binding, which is used as a fast method of accessing variable bindings in many (dynamic scope !) LISP-systems, is adapted to static scoping . Then a dynamic optimization of simple and formal tail recursive functions is introduced. This technique is extended such that "covered tail recursire" functions are also interpreted very efficiently. Functions of this kind are typical for recursive operations on list structures. Finally, it is shown that the combination of these three techniques keeps the extra expense for static scoping small.