|
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 the asymptotic inequalities that hold between them.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
 |
AFL95
|
Alexander Aiken , Manuel Fähndrich , Raph Levien, Better static memory management: improving region-based analysis of higher-order languages, Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation, p.174-185, June 18-21, 1995, La Jolla, California, United States
|
| |
App92
|
|
| |
AS96
|
Andrew W. Appel and Zhong Sham. An empirical and analytic study of stack vs. heap cost for languages with closures. Journal of Functional Programming, 6(1):47-74, 1996.
|
 |
Bak95
|
|
 |
Boe93
|
|
 |
CH94
|
William D. Clinger , Lars Thomas Hansen, Lambda, the ultimate label or a simple optimizing compiler for Scheme, Proceedings of the 1994 ACM conference on LISP and functional programming, p.128-139, June 27-29, 1994, Orlando, Florida, United States
|
 |
Cha88
|
|
 |
Cli84
|
|
| |
CLR90
|
|
| |
FH95
|
|
 |
Fis72
|
|
 |
FSDF93
|
Cormac Flanagan , Amr Sabry , Bruce F. Duba , Matthias Felleisen, The essence of compiling with continuations, Proceedings of the ACM SIGPLAN 1993 conference on Programming language design and implementation, p.237-247, June 21-25, 1993, Albuquerque, New Mexico, United States
|
| |
GW95
|
|
 |
Han90
|
|
| |
Hew77
|
Carl Hewitt. Viewing control structures as patterns of passing messages. Artificial Intelligence, 8:323-364, 1977.
|
| |
IEE91
|
|
| |
KCR98
|
Richard Kelsey, William Clinger, and Jonathan Rees (eds.). Revised5 report on the algorithmic language Scheme. ftr://ftr. nj. nee. com/pub/kel sey/rSrs, ps, February 1998.
|
 |
KKsR+86
|
David Kranz , Norman Adams , Richard Kelsey , Jonathan Rees , Paul Hudak , James Philbin, ORBIT: an optimizing compiler for scheme, ACM SIGPLAN Notices, v.21 n.7, p.219-233, July 1986
|
| |
Knu73
|
|
| |
Lig90
|
|
 |
MFH95
|
Greg Morrisett , Matthias Felleisen , Robert Harper, Abstract models of memory management, Proceedings of the seventh international conference on Functional programming languages and computer architecture, p.66-77, June 26-28, 1995, La Jolla, California, United States
[doi> 10.1145/224164.224182]
|
| |
MH97
|
|
| |
NN92
|
|
| |
Que96
|
|
 |
Ram94
|
|
| |
Ram97
|
John D. RamsdeIl. The tail recursive SECD machine. To appear, 1998.
|
| |
Ser97
|
Manuel Serrano. Bigloo user's manual. Part of the Bigloo 1.9 distribution available via httr: / / cuiww~, uni ge. ch/~e rrano/b igloo, html, 1997.
|
 |
SF96
|
|
| |
Sis97
|
Jeffrey Mark Siskind. Stalin - a STAtic Language ImplementatioN. Software available via http://w~, neci .nj .nec. com/homepages/qobi/, 1997.
|
| |
SS75
|
|
| |
SS76
|
|
| |
SS78a
|
|
| |
SS78b
|
Guy L. Steele, Jr. and Gerald Jay Sussman. The revised report on SCHEME. Artificial Intelligence Memo 452, Massachusetts Institute of Technology, Cambridge~ MA, January 1978.
|
| |
Ste76
|
|
 |
Ste77
|
|
| |
Ste78
|
|
 |
TT94
|
|
 |
Wan80
|
|
| |
WF78
|
Mitchell Wand and Daniel P. Friedman. Compiling larnbda expressions using continuations and factorizations. Journal of Computer Languages, 3:241-263, 1978.
|
CITED BY 30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
H. Abelson , R. K. Dybvig , C. T. Haynes , G. J. Rozas , N. I. Adams Iv , D. P. Friedman , E. Kohlbecker , G. L. Steele, Jr. , D. H. Bartley , R. Halstead , D. Oxley , G. J. Sussman , G. Brooks , C. Hanson , K. M. Pitman , M. Wand, Revised Report on the Algorithmic Language Scheme, Higher-Order and Symbolic Computation, v.11 n.1, p.7-105, August 1998
|
|
|
Angel Dominguez , Nghi Nguyen , Rajeev K. Barua, Recursive function data allocation to scratch-pad memory, Proceedings of the 2007 international conference on Compilers, architecture, and synthesis for embedded systems, September 30-October 03, 2007, Salzburg, Austria
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Michael Sperber , R. kent Dybvig , Matthew Flatt , Anton Van straaten , Robby Findler , Jacob Matthews, Revised6 report on the algorithmic language scheme, Journal of Functional Programming, v.19 n.S1, p.1-301, August 2009
|
|