Proper Tail Recursion and Space Efficiency (1998)
| Citations: | 53 - 1 self |
BibTeX
@INPROCEEDINGS{Clinger98propertail,
author = {William D. Clinger},
title = {Proper Tail Recursion and Space Efficiency},
booktitle = {},
year = {1998},
pages = {174--185},
publisher = {ACM Press}
}
Years of Citing Articles
OpenURL
Abstract
The IEEE/ANSI standard for Scheme requires implementations to be properly tail recursive. This ensures that portable code can rely upon the space efficiency of continuation-passing style and other idioms. On its face, proper tail recursion concerns the efficiency of procedure calls that occur within a tail context. When examined closely, proper tail recursion also depends upon the fact that garbage collection can be asymptotically more space-efficient than Algol-like stack allocation. Proper tail recursion is not the same as ad hoc tail call optimization in stack-based languages. Proper tail recursion often precludes stack allocation of variables, but yields a well-defined asymptotic space complexity that can be relied upon by portable programs. This paper offers a formal and implementation-independent definition of proper tail recursion for Scheme. It also shows how an entire family of reference implementations can be used to characterize related safe-for-space properties, and proves ...







