## The Tail-Recursive SECD Machine (1999)

Venue: | Journal of Automated Reasoning |

Citations: | 5 - 0 self |

### BibTeX

@ARTICLE{Ramsdell99thetail-recursive,

author = {John D. Ramsdell},

title = {The Tail-Recursive SECD Machine},

journal = {Journal of Automated Reasoning},

year = {1999},

volume = {23}

}

### Years of Citing Articles

### OpenURL

### Abstract

One method for producing verified implementations of programming languages is to formally derive them from abstract machines. Tail-recursive abstract machines provide e#cient support for iterative processes via the ordinary procedure call mechanism. This document argues that the use of tail-recursive abstract machines incurs only a small increase in theorem-proving burden when compared with what is required when using ordinary abstract machines. The position is supported by comparing correctness proofs performed using the BoyerMoore theorem prover. A by-product of this e#ort is a syntactic criterion based on tail contexts for identifying which procedure calls must be implemented as tail calls. The concept of tail contexts was used in the latest Scheme Report, the only language specification known to the author that defines the requirement that its implementations must be tail recursive. Keywords: tail recursion, tail call, SECD machine, CEK machine, verified implementati...

### Citations

1119 |
The Lambda Calculus: Its Syntax and Semantics
- BARENDREGT
- 1984
(Show Context)
Citation Context ...rammar is the language it generates. A metavariable decorated with a bar stands for both a syntactic category in a grammar and the set defined by it. The notation used for #-terms is due to de Bruijn =-=[1]-=-. For machinegenerated proofs, the notation is preferable to the standard one because every element in the set of terms in standard notation that di#er only because of a change in bound variables corr... |

395 |
A Computational Logic Handbook
- Boyer, Moore
- 1988
(Show Context)
Citation Context ...that the correctness proof of the TR-SECD machine is only slightly more complex than the one for the SECD machine. Each correctness proof was performed using the Boyer-Moore theorem prover NQTHM-1992 =-=[2]-=-. The logic of the Boyer-Moore theorem prover is first order, and the system provides extensive support for recursively defined total functions and inductive proofs. The TR-SECD machine has two transi... |

268 | The essence of compiling with continuations
- Flanagan, Sabry, et al.
- 1993
(Show Context)
Citation Context ...form to produce a syntax directed compiler that is tail recursive by omitting the push of a stack frame when compiling tail calls. Another syntactic approach to identifying tail calls is presented in =-=[7]-=-. The paper presents a set of source-to-source reduction rules that transform a core of Scheme into something called A-Normal Form, which is a good intermediate representation for compilers. Procedure... |

220 |
Call-by-name, call-by-value and the -calculus
- Plotkin
- 1975
(Show Context)
Citation Context ...ects studied. More than twenty years ago, Gordon Plotkin published a famous paper that examines the relation between the lambda calculus and ISWIM, a programming language based on the lambda calculus =-=[13]-=-. ISWIM has an operational semantics given by the SECD machine. The paper includes a proof that the semantics defined by the SECD machine is equivalent to a recursively defined function that implement... |

199 |
Call-by-name, call-by-value and the λ-calculus
- Plotkin
- 1975
(Show Context)
Citation Context ...ects studied. More than twenty years ago, Gordon Plotkin published a famous paper that examines the relation between the lambda calculus and ISWIM, a programming language based on the lambda calculus =-=[13]-=-. ISWIM has an operational semantics given by the SECD machine. The paper includes a proof that the semantics defined by the SECD machine is equivalent to a recursively defined function that implement... |

105 |
Danvy and Andrzej Filinski. Representing control: A study of the CPS transformation
- Olivier
- 1992
(Show Context)
Citation Context ...ant because the step count for values does not depend on the Boolean parameter. The tail combinations identified by the above grammar play distinguished roles in other works. For example, Figure 3 in =-=[5]-=- presents a CPS transform that treats tail combinations specially. Contexts provide an alternative to a grammar for identifying tail combinations. A combination context is a #-term when its hole is re... |

60 | tail recursion and space efficiency
- Clinger
- 1998
(Show Context)
Citation Context ...added text to the fifth revision of the Scheme Report [12]. Pages 7–8 clearly define the requirement that its implementations be tail recursive. A formal definition of the requirement can be found in =-=[4]-=-. This document argues that the use of tail-recursive abstract machines incurs only a small increase in theorem-proving burden when compared with what is required when using ordinary abstract machines... |

45 | VLISP: A verified implementation of Scheme
- Guttman, Ramsdell, et al.
- 1995
(Show Context)
Citation Context ...r classes of objects. Both of these features lead to a reduction in the number of cases required by automated proofs. The TR-SECD machine is similar to the abstract machines used in the Vlisp Project =-=[9]-=-, a project that produced a verified implementation of the Scheme programming language in the sense that the algorithms used by the implementation were formally verified. Since the author contributed ... |

44 |
Control operators, the SECD-machine, and the lambda-calculus
- Felleisen, Friedman
- 1986
(Show Context)
Citation Context ...il-recursive machine that does not seem to distinguish between the two types of combinations, however, a careful analysis of the machine shows the distinction is important for it too. The CEK machine =-=[6]-=- is similar to the SECD machine but closer to a denotation semantics of ISWIM. The states of the machine are triples composed of a term, an environment, and a continuation code which represents The Ta... |

38 |
The Scheme 311 Compiler: An Exercise in Denotational Semantics
- Clinger
- 1984
(Show Context)
Citation Context ...s that the callee must ensure that a return to the caller results in the restoration of the SEC part of the TR-SECD machine. This version of a TR-SECD machine is motivated by the Scheme 311 byte code =-=[3]-=-. Many e#orts aimed at formally deriving e#cient implementations of programming languages produce implementations that are not tail recursive. Some start with the SECD machine [8], and some start with... |

36 |
1178-1990. IEEE Standard for the Scheme Programming Language
- Std
- 1991
(Show Context)
Citation Context ...e; the Scheme programming language being a prime example. When this paper was written, the requirement for Scheme was expressed solely in the following paragraph on page 9 in the IEEE Scheme Standard =-=[11]-=-: Implementations of Scheme are required to be properly tail-recursive. This allows the execution of an iterative computation in constant space, even if the iterative computation is described by a syn... |

34 |
Correctness of procedure representations in higher-order assembly language
- Wand
- 1991
(Show Context)
Citation Context ... The syntax defined by T is the same as the original syntax except that procedure calls generated by T are delimited using angle brackets. The marked procedure calls are the tail calls. Mitchell Wand =-=[17]-=- used a grammar of this form to produce a syntax directed compiler that is tail recursive by omitting the push of a stack frame when compiling tail calls. Another syntactic approach to identifying tai... |

17 |
Making abstract machines less abstract
- Hannan
- 1991
(Show Context)
Citation Context ...riving e#cient implementations of programming languages produce implementations that are not tail recursive. Some start with the SECD machine [8], and some start with the Categorical Abstract Machine =-=[10]-=-. The motivation for this work was to show that using tail-recursive abstract machines results in implementations that e#ciently handle iterative processes with only a modest increase in theorem-provi... |

4 |
Proper tail recursion and space eciency
- Clinger
- 1998
(Show Context)
Citation Context ...dded text to the fifth revision of the Scheme Report [12]. Pages 7--8 clearly define the requirement that its implementations be tail recursive. A formal definition of the requirement can be found in =-=[4]-=-. This document argues that the use of tail-recursive abstract machines incurs only a small increase in theorem-proving burden when compared with what is required when using ordinary abstract machines... |

2 |
The SECD Machine: A Verification Case Study. SECS178
- Graham
- 1992
(Show Context)
Citation Context ...Scheme 311 byte code [3]. Many e#orts aimed at formally deriving e#cient implementations of programming languages produce implementations that are not tail recursive. Some start with the SECD machine =-=[8]-=-, and some start with the Categorical Abstract Machine [10]. The motivation for this work was to show that using tail-recursive abstract machines results in implementations that e#ciently handle itera... |

2 |
SECD events. NQTHM event file
- Ramsdell
- 1996
(Show Context)
Citation Context ...o fully automated correctness proofs. The first proof shows that a recursively defined evaluation function for the lambda value calculus is equal to an evaluation function defined by the SECD machine =-=[14]-=-. The second proof shows that the same recursively defined evaluation function is equal to an evaluation function defined by the TR-SECD machine [15], a variation of the SECD machine that is tail recu... |