Reflection for the Masses

  • Charlotte Herzeel
  • Pascal Costanza
  • Theo D’Hondt
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5146)


A reflective programming language provides means to render explicit what is typically abstracted away in its language constructs in an on-demand style. In the early 1980’s, Brian Smith introduced a general recipe for building reflective programming languages with the notion of procedural reflection. It is an excellent framework for understanding and comparing various metaprogramming and reflective approaches, including macro programming, first-class environments, first-class continuations, metaobject protocols, aspect-oriented programming, and so on. Unfortunately, the existing literature of Brian Smith’s original account of procedural reflection is hard to understand: It is based on terminology derived from philosophy rather than computer science, and takes concepts for granted that are hard to reconstruct without intimate knowledge of historical Lisp dialects from the 1960’s and 1970’s. We attempt to untangle Smith’s original account of procedural reflection and make it accessible to a new and wider audience. On the other hand, we then use its terminological framework to analyze other metaprogramming and reflective approaches, especially those that came afterwards.


Programming Language Procedure Call Language Construct Closure Object Execution Context 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Smith, B.C.: Reflection and semantics in lisp. In: POPL 1984: Proceedings of the 11th ACM SIGACT-SIGPLAN symposium on Principles of programming languages, pp. 23–35. ACM Press, New York (1984)Google Scholar
  2. 2.
    Steyaert, P.: Open Design of Object-Oriented Languages. PhD thesis. Vrije Universiteit Brussel (1994)Google Scholar
  3. 3.
    Kiczales, G., Rivieres, J.D., Bobrow, D.: The art of the Metaobject Protocol. MIT Press, Cambridge (1991)Google Scholar
  4. 4.
    Smith, B.C., Rivieres, J.D.: Interim 3-Lisp Reference Manual. Intelligent Systems Laboratory. PALO ALTO RESEARCH CENTER. (June 1984)Google Scholar
  5. 5.
    Abelson, H., Sussman, G.J.: Structure and Interpretation of Computer Programs, 2nd edn. MIT Press, Cambridge (1996)zbMATHGoogle Scholar
  6. 6.
    Wand, M., Friedman, D.P.: The mystery of the tower revealed: a non-reflective description of the reflective tower. In: Proceedings of the 1986 ACM Symposium on LISP and Functional Programming, pp. 298–307 ( August 1986)Google Scholar
  7. 7.
    McCarthy, J.: LISP 1.5 Programmer’s Manual. MIT Press, Cambridge (1962)Google Scholar
  8. 8.
    Teitelman, W.: PILOT: A Step Toward Man-Computer Symbioses. PhD thesis, Massaschusetts Institute of Technology (1966)Google Scholar
  9. 9.
    Moses, J.: The function of function in lisp or why the funarg problem should be called the environment problem. SIGSAM Bull.  15, 13–27 (1970)CrossRefGoogle Scholar
  10. 10.
    Steele, G.L., Sussman, G.J.: The art of the interpreter or, the modularity complex (parts zero, one, and two). Technical report, Cambridge, MA, USA (1978)Google Scholar
  11. 11.
    Hart, T.P.: Macro definitions for lisp. Technical report, Cambridge, MA, USA (1963)Google Scholar
  12. 12.
    Pitman, K.M.: Special forms in lisp. In: LFP 1980: Proceedings of the 1980 ACM conference on LISP and functional programming. ACM Press, New York (1980)Google Scholar
  13. 13.
    Sperber, M., Dybvig, R.K., Flatt, M., van Straaten, A., Kelsey, R., Clinger, W., Reese, J., Findler, R.B., Matthews, J.: Revised6 report on the algorithmic language Scheme (September 2007)Google Scholar
  14. 14.
    Pitman, K.M., ed.: ANSI INCITS 226-1994 (formerly ANSI X3.226:1994) American National Standard for Programming Language Common LISP is the official standard (1994)Google Scholar
  15. 15.
    Queinnec, C., de Roure, D.: Sharing code through first-class environments. SIGPLAN Not. 31(6), 251–261 (1996)Google Scholar
  16. 16.
    Gelernter, D., Jagannathan, S., London, T.: Environments as first class objects. In: POPL 1987: Proceedings of the 14th ACM SIGACT-SIGPLAN symposium on Principles of programming languages, pp. 98–110. ACM Press, New York (1987)Google Scholar
  17. 17.
    Friedman, D.P., Wand, M.: Reification: Reflection without metaphysics. In: Conference Record of the 1984 ACM Symposium on LISP and Functional Programming, pp. 348–355, (1984)Google Scholar
  18. 18.
    Danvy, O., Malmkjær, K.: A blond primer. Technical Report DIKU Rapport 88/21, DIKU (October 1988)Google Scholar
  19. 19.
    Asai, K., Masuhara, H., Matsuoka, S., Yonezawa, A.: Partial evaluation as a compiler for reflective languages. Technical report, University of Tokyo (1995)Google Scholar
  20. 20.
    Bretthauer, H., Davis, H.E., Kopp, J., Playford, K.J.: Balancing the EuLisp Metaobject Protocol. In: Proc. of International Workshop on New Models for Software Architecture, Tokyo, Japan (1992)Google Scholar
  21. 21.
    Chiba, S.: A metaobject protocol for C++. In: ACM Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA 1995), Austin, Texas, USA, October 1995. SIGPLAN Notices, vol. 30(10), pp. 285–299 (1995)Google Scholar
  22. 22.
    Brant, J., Foote, B., Johnson, R.E., Roberts, D.: Wrappers to the rescue. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 396–417. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  23. 23.
    Goldberg, A., Robson, D.: Smalltalk-80: The Language. Addison-Wesley Longman Publishing Co., Inc., Boston (1989)zbMATHGoogle Scholar
  24. 24.
    Ducasse, S.: Evaluating message passing control techniques in smalltalk. Journal of Object-Oriented Programming (JOOP), 12(6), 39–44 (1999)Google Scholar
  25. 25.
    Bracha, G., Ungar, D.: Mirrors: design principles for meta-level facilities of object-oriented programming languages. In: OOPSLA 2004: Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pp. 331–344. ACM Press, New York (2004)CrossRefGoogle Scholar
  26. 26.
    Mostinckx, S., Cutsem, T.V., Timbermont, S., Tanter, É.: Mirages: behavioral intercession in a mirror-based architecture. In: DLS 2007: Proceedings of the 2007 symposium on Dynamic languages, pp. 89–100. ACM Press, New York (2007)CrossRefGoogle Scholar
  27. 27.
    Kiczales, G., Lamping, J., Menhdhekar, A., Maeda, C., Lopes, C., Loingtier, J.M., Irwin, J.: Aspect-oriented programming. In: Akşit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)Google Scholar
  28. 28.
    Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An overview of aspectj. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–353. Springer, Heidelberg (2001)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Charlotte Herzeel
    • 1
  • Pascal Costanza
    • 1
  • Theo D’Hondt
    • 1
  1. 1.Programming Technology LabVrije Universiteit BrusselBrusselBelgium

Personalised recommendations