CONS should not CONS its arguments, part II: Cheney on the M.T.A.

  title={CONS should not CONS its arguments, part II: Cheney on the M.T.A.},
  author={Henry G. Baker},
  journal={ACM SIGPLAN Notices},
  • H. Baker
  • Published 1 September 1995
  • Computer Science
  • ACM SIGPLAN Notices
Previous Schemes for implementing full tail-recursion when compiling into C have required some form of "trampoline" to pop the stack. We propose solving the tail-recursion problem in the same manner as Standard ML of New Jersey, by allocating all frames in the (garbage-collected) heap. The Scheme program is translated into continuation-passing style, so the target C functions never return. The C stack pointer then becomes the allocation pointer for a Cheney-style copying garbage collection… 
Managing continuations for proper tail recursion
This paper discovered that an abstract machine that runs CPS-converted programs cannot be considered properly tailrecursive if continuation closures are simply created with the lexical environments for all variables, and proposes new techniques to implement a properly tail-recursive Scheme interpreter in an extended C language by following space-efficiency based definitions of proper tail recursion.
What If We Don't Pop the Stack? The Return of 2nd-Class Values (Artifact)
This artifact contains a compiler implementation of the calculus in Scala Native, a type system and operational semantics with 2nd-class values and delayed stack reclamation, and code for reproducing the evaluation.
Evaluating Portable Mechanisms for Legitimate Execution Stack Access with a Scheme Interpreter in an Extended SC Language
An efficient C-based implementation written in an extended C language called XC-cube, which features language mechanisms for implementing high-level programming languages such as “L-closures” for legitimate execution stack access, with which a running program/process can legitimately access data deeply in execution stacks (C stacks).
Compiling Scheme programs to . NET Common Intermediate Language
This paper presents the compilation of the Scheme programming language to .NET platform, and discusses how to map Scheme constructs to CIL, and compares the performances of these programs when compiled to C, JVM and .NET.
Proper tail recursion and space efficiency
This paper offers a formal and implementation-independent definition of proper tail recursion for Scheme, and 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.
Bigloo.NET: compiling Scheme to .NET CLR
It is shown that in term of speed performance of the Mono implementation of .NET, the best implementing running on both Windows and Linux, still lags behind C and fast JVMs such as the Sun’s implementations.
Accurate garbage collection in uncooperative environments revisited
The proposed lazy pointer stacks mechanism provides a speedup of 4.5% over Henderson's accurate collector with a 17% increase in code size and is validated with the implementation of a real‐time concurrent garbage collection algorithm.
Efficient compilation of tail calls and continuations to JavaScript
This paper describes an approach for compiling Scheme's tail calls and first-class continuations to JavaScript, a dynamic language without those features. Our approach is based on the use of a simple
Continuation Passing Style in C and the Cost of Tail-call Elimination with GCC
Several possible approaches to expressing CPS in C are explored, the largest problem to deal with is the general lack of tail-call elimination.
CHR for Imperative Host Languages
It is argued that a tight, natural integration leads to a powerful programming language extension, intuitive to both CHR and imperative programmers, and how to compile CHR to highly optimized imperative code is shown.


Efficient stack allocation for tail-recursive languages
  • C. Hanson
  • Computer Science
    LISP and Functional Programming
  • 1990
The Scheme dialect of Lisp [9] is properly tail-recuraiwit relies entirely on procedure calls to express iteration. In Scheme, a tail-recursive procedure call (that is, a call in which the calling
Memory allocation and higher-order functions
A constant-time marking-collecting algorithm to efficiently implement recursion with a general heap memory rather than with a vectorial stack, in a context of frequent captures of continuations, to reduce the 80% garbage collection overhead to less than 5% on average.
No assembly required: compiling standard ML to C
This work shows how to compile Standard ML to C without compromising on portability and proper tail recursion, and analyzes the performance and determines the aspects of the compilation method that lead to the observed slowdown.
CONS should not CONS its arguments, or, a lazy alloc is a smart alloc
Lazy allocation is a model for allocating objects on the execution stack of a high-level language which does not create dangling references, and can reduce the amortized cost of allocation in such a heap by filtering out the short-lived objects that can be more efficiently managed in LIFO order.
89 / 1 SCHEME-> C a Portable Scheme-toC Compiler
To investigate issues, such a compiler and run-time system were constructed at Digital Equipment Corporation’s Western Research Laboratory and it shows that there is a translation of Scheme to C, that has good performance, and is portable.
Phantom Stacks: If You Look Too Hard, They Aren't There
This paper provides an extremely simple way of managing memory which only once in a while violates stack restrictions without paying a price the rest of the time, in which only the part of the system which actually uses the stack needs to know anything about the stack.
The Implementation of Functional Programming Languages
Implementation strategies for continuations
It is reported that Danvy's conjecture that continuation captures occur in clusters is somewhat true in the commercial setting of MacScheme+Toolsmith™, which provides tools for developing Macintosh user interfaces in Scheme and that other strategies perform better when continuations are used.
Lambda calculus schemata
A lambda-calculus schema is an expression of the lambda calculus augmented by uninterpreted constant and operator symbols. It is an abstraction of programming languages such as LISP which permit
Garbage Collection can be Faster than Stack Allocation
  • A. Appel
  • Computer Science
    Inf. Process. Lett.
  • 1987