Skip to main content
Log in

The Tail-Recursive SECD Machine

  • Published:
Journal of Automated Reasoning Aims and scope Submit manuscript

Abstract

One method for producing verified implementations of programming languages is to formally derive them from abstract machines. Tail-recursive abstract machines provide efficient 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 Boyer–Moore theorem prover.

A by-product of this effort 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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Barendregt, H. P.: The Lambda Calculus, Its Syntax and Semantics, North-Holland, Amsterdam, 1984, revised edition.

    Google Scholar 

  2. Boyer, R. S. and Moore, J S.: A Computational Logic Handbook, Academic Press, 1988.

  3. Clinger, W. D.: The scheme 311 compiler: An exercise in denotational semantics, in ACM Symposium on Lisp and Functional Programming, New York, 1984, pp. 356–364.

  4. Clinger, W. D.: Proper tail recursion and space efficiency, ACM SIGPLAN Notices 33(5) (1998), pp. 174–185. Proc. SIGPLAN '98 Conference on Programming Language Design and Implementation.

    Google Scholar 

  5. Danvy, O. and Filinski, A.: Representing control, a study of the CPS transformation, Math. Struct. Comput. Sci. 2(4) (1992), pp. 361–391.

    Google Scholar 

  6. Felleisen, M. and Friedman, D.: Control operators, the SECD-machine, and the lambda calculus, in M. Wirsing (ed.), Formal Description of Programming Concepts III, Elsevier, Amsterdam, 1987, pp. 193–217.

    Google Scholar 

  7. Flanagan, C., Sabry, A., Duba, B. F. and Felleisen, M.: The essence of compiling with continuations, ACM SIGPLAN Notices 28(6) (1993), pp. 237–247. Proc. SIGPLAN '93 Conference on Programming Language Design and Implementation.

    Google Scholar 

  8. Graham, B. T.: The SECD Machine: A Verification Case Study, SECS178, Kluwer Academic Publishers, Dordrecht, 1992.

    Google Scholar 

  9. Guttman, J. D. and Wand, M. (eds.): VLISP: A Verified Implementation of Scheme, Kluwer Academic Publishers, Dordrecht, 1995. Contents identical to Lisp and Symbolic Computation, Vol. 8, Nos. 1 & 2, special double issue devoted to the results of VLISP.

    Google Scholar 

  10. Hannan, J.: Making abstract machines less abstract, in J. Hughes (ed.), Lecture Notes in Comput. Sci. 524, 1991, pp. 618–635. Proc. of the 5th ACM Conference on Function Programming Languages and Computer Architecture.

  11. IEEE Std 1178-1990: IEEE Standard for the Scheme Programming Language, Institute of Electrical and Electronic Engineers, New York, 1991.

    Google Scholar 

  12. Kelsey, R., Clinger, W. and Rees, J. (eds.): Revised5 report on the algorithmic language scheme, Higher-Order and Symbolic Computation 11(1) (1998), pp. 7–105.

  13. Plotkin, G. D.: Call-by-name, Call-by-value and the-calculus, Theoret. Comput. Sci. (1975), 125–159.

  14. Ramsdell, J. D.: SECD Events, NQTHM event file, 1996. ftp://ftp.cs.utexas.edu/pub/boyer/nqthm/trsecd/secd.events.

  15. Ramsdell, J. D.: TR-SECD Events, NQTHM event file, 1996. ftp://ftp.cs.utexas.edu/pub/boyer/nqthm/trsecd/trsecd.events.

  16. Shankar, N.: Metamathematics, Machines, and Goedel's Proof, Cambridge Univ. Press, Cambridge, 1994, revised edition.

    Google Scholar 

  17. Wand, M.: Correctness of procedure representations in higher-order assembly language, in S. Brookes, M. Main, A. Melton, M. Mislove, and D. Schmidt (eds.), Lecture Notes in Comput. Sci. 529, 1991, pp. 294–311. Mathematical Foundations of Programming Semantics.

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Ramsdell, J.D. The Tail-Recursive SECD Machine. Journal of Automated Reasoning 23, 43–62 (1999). https://doi.org/10.1023/A:1006151910336

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/A:1006151910336

Navigation