Discussion seminar: Metaprogramming

Metaprograms process and produce source code. A metaprogram treats a regular program as data and thus enables abstractions and reflections outside the scope of regular programming languages. Metaprogramming is widely applied in programming languages. From C++ templates and syntactic macros, to model-driven development, domain-specific languages and aspect-oriented programming: Metaprogramming plays a significant role in many modern programming systems. In this seminar, we study the foundations of metaprogramming and its applications in modern software development.

This is a discussion seminar with weekly meetings. In each meeting, we discuss a scientific article. The following weekly activities are required:

  • reading a scientific article,
  • writing a short summary of the article (max 0.5 pages),
  • active participation in the discussion of the article.


Date Material
Wednesday, 17. April Introductory slides
Wednesday, 26. April McCarthy, 1960. Recursive Functions of Symbolic Expressions and their Computation by Machine, Part 1
Tuesday, 30 April
(16.15, S103-126)
Veldhuizen, 1998. C++ Templates as Partial Evaluation
Wednesday, May 8 no meeting
Wednesday, May 15 Please prepare both papers:
Clinger and Rees, 1991. Macros that Work
Weise and Crew, 1993. Programmable Syntax Macros
Wednesday, May 22 Taha and Sheard, 1997.Multi-Stage Programming with Explicit Annotations
Wednesday, May 29 Rompf and Odersky, 2010. Lightweight Modular Staging
Wednesday, June 05 Kiczales, Ashley, Rodriguez, Vahdat, and Bobrow, 1993. Metaobject protocols: why we want them and what else they can do
Wednesday, June 12 Friedman and Wand, 1984. Reification: Reflection without Metaphysics
Wednesday, June 19 Reynolds, 1972. Definitional interpreters for higher-order programming languages
Wednesday, June 26 no meeting
Wednesday, July 3 Meyerovich et al., 2009. Flapjax: A Programming Language for Ajax Applications
Wednesday, July 10 Axelsson, 2012. A Generic Abstract Syntax Model for Embedded Languages
Wednesday, July 17 Erdweg, Rendel, Kästner, and Ostermann, 2011. SugarJ: Library-based Syntactic Language Extensibility

Course Information



Course Type

S2 / 3 CP


Wednesday, 17. April, 16:15 in S1|03-126


Wednesdays, 16:15 - 17:55 in S1|03-126


Sebastian Erdweg


Please register in TUCAN and also send an email to Sebastian Erdweg. To ensure an interactive and productive seminar, we have to limit the number of participants to aprox. 15.


The seminar will take place in English.