Skip to main content
Log in

A simple reflective interpreter

  • Published:
LISP and Symbolic Computation

Abstract

Procedurally reflective programming languages enable user programs to semantically extend the language itself, by permitting them to run at the level of the language implementation with access to their context. The reflective tower, first introduced by Brian Smith, is the principal architecture for such languages. It is informally described as an infinitely ascending tower of metacircular interpreters, connected by a mechanism that allows programs at one level to run at the next higher level. Various accounts of the reflective tower have been published, including a metacircular definition, operational definitions, and denotational definitions. We present an operational account of the main aspects of the reflective tower, which we claim is simpler than previous accounts. Our approach is to implement a finite tower where each level literally runs the level directly below it. A complete Scheme implementation is included.

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. A. Bawden, “Reification without evaluation,” inConf. Rec. 1988 ACM Symposium on Lisp and Functional Programming, July 1988, pp. 342–351.

  2. O. Danvy and K. Malmkjær, “Intensions and extensions in a reflective tower,” inConf. Rec. 1988 ACM Symposium on Lisp and Functional Programming, July 1988, pp. 327–34.

  3. J. des Rivières, “Control-related meta-level facilities in Lisp (extended abstract),” inMeta-Level Architectures and Reflection, P. Maes and D. Nardi (Eds.), North-Holland, pp. 101–110, 1988.

  4. J. des Rivières and B.C. Smith, “Implementation of procedurally reflective languages,” inConf. Rec. 1984 ACM Symposium on Lisp and Functional Programming, August 1984, pp. 331–347.

  5. J. Rees and W. Clinger (Eds.), “Revised3 report on the algorithmic language scheme,”SIGPLAN Notices, Vol. 21, No. 9, pp. 37–79, 1986.

  6. B.C. Smith,Reflection and Semantics in a Procedural Language, Ph.D. Thesis, MIT, Cambridge, MA, January 1982. MIT-LCS-TR-272.

    Google Scholar 

  7. B.C. Smith, “Reflection and semantics in Lisp,” inConf. Rec. 11th ACM Symp. on Principles of Programming Languages, 1984, pp. 23–35.

  8. B.C. Smith and J. des Rivières,Interim 3-Lisp Reference Manual, Intelligent Systems Laboratory, Xerox PARC, Palo Alto, California, 1984.

    Google Scholar 

  9. M. Wand and D.P. Friedman, “The mystery of the tower revealed: A nonreflective description of the reflective tower,”Lisp and Symbolic Computation, Vol. 1, No. 1, pp. 11–38, 1988.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Additional information

An earlier version of this paper appeared inProceedings of the International Workshop on New Models for Software Architecture '92: Reflection and Meta-level Architecture, November 1992. This material is based on work supported by the National Science Foundation under Grants NSF CCR 89-01919 and NSF CCR 90-00597.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Jefferson, S., Friedman, D.P. A simple reflective interpreter. Lisp and Symbolic Computation 9, 181–202 (1996). https://doi.org/10.1007/BF01806112

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01806112

Keywords

Navigation