Metaprogramming Seminar


Sebastian Hack, Marcel Köster, Richard Membarth, Philipp Slusallek


Language English
Participants 12
Preparatory Meeting 2013-10-24, 2:00 pm - 4:00 pm (sine tempore), E1.3 room 401
Weekly Meeting Thursdays 2:00 pm - 4:00 pm (cum tempore), E 1.3 room 401
Availability registration closed
Prerequisites basic knowledge about functional programming
Topics partial evaluation, multi-staged programming, computation on types,
metaprogramming capabilities in programming languages, domain-specific languages using metaprogramming



Modus Operandi

Each paper will be assigned to one participant. We will have weekly meetings during the semester in which we will discuss one of the papers. The discussion will be managed by the student to whom the paper was assigned. She/He is responsible for giving a short summary on the paper and for structuring the following discussion.

Every week each student has to write a summary (max. 500 words) on the week's paper. This summary should include open questions and is to be submitted to Marcel Köster two days before the corresponding meeting (11:59 pm). The summaries of all participants will be made available and can be used by the moderator to structure the discussion in the following meeting.

At the end of the semester each participant will give a presentation (30 minutes) about her/his paper.

Each participant is allowed to drop two summaries without any particular reason. In case you drop a summary, please send a short mail telling so.


The preparatory meeting for this seminar took place on Thursday, October 24, 2:00 pm, E 1.3, room 401.

The papers were assigned during the first meeting.


Date Moderator Topic Paper Summaries
Thursday, October 24 Hack/Köster/Membarth/Slusallek Introductory meeting: metaprogramming techniques and its applications. none none
Thursday, October 31 / no meeting
Thursday, November 7 Maximilan Kleber Futamura Projections and the MIX System Papers: [G1] "Partial Evaluation of Computation Process" and [G2] "Mix Ten Years Later"
Thursday, November 14 Dennis Mueller Lambda Dropping Paper: [G3] "Lambda-Dropping: Transforming Recursive Equations into Programs with Block Structure"
Thursday, November 21 Sebastian Kappler Deferred Compilation Paper: [G4] "Deferred Compilation: The Automation of Run-Time Code Generation"
Thursday, November 28 Heiko Becker Henk Paper: [G5] "Henk: a typed intermediate language"
Thursday, December 12 Lukas Bard Quasiquotation in Lisp Paper: [L1] "Quasiquotation in Lisp"
Thursday, December 19 Konstantin Schwarz Hygienic Macros Paper: [L2] "A Theory of Hygienic Macros"
Thursday, January 9 Tobias Frey Multistaging in MetaML Paper: [L3] "MetaML and Multi-Stage Programming with Explicit Annotations"
Thursday, January 16 Fabian Kosmale C++ Templates Literature: [L5] "Static Metaprogramming in C++"
Thursday, January 16 Daniel Birtel Lightweight Modular Staging Paper: [L6] "Lightweight Modular Staging: A Pragmatic Approach to Runtime Code Generation and Compiled DSLs"
Thursday, January 30 Tina Jung Binding-Time Analysis Paper: [B1] "Binding-Time Analysis for Higher Order Untyped Functional Languages"
Thursday, January 30 Manuel Zapp Delite Paper: [A1] "A Domain-Specific Approach To Heterogeneous Parallelism"
Thursday, February 6 Maximilian Zoellner Terra Paper: [A2] "Terra: A Multi-Stage Language for High-Performance Computing"


The date for the final talks will be announced soon. Each talk should be planned to take 25-30 minutes plus discussion (5-10 minutes).


[G] General Techniques

  1. Futamura Y. Partial Evaluation of Computation Process - An Approach to a Compiler-Compiler, Higher-Order and Symbolic Computation 12 (1999)
  2. Jones N. D.Mix ten years later, PEPM 1995
  3. Danvy O., Schulz U. Lambda-Dropping: Transforming Recursive Equations into Programs with Block Structure, PEPM 1997
  4. Leone M., Lee P. Deferred Compilation: The Automation of Run-Time Code Generation, PEPM 1994
  5. Jones S. P., Meijer E. Henk: A Typed Intermediate Language, First Int'l Workshop on Types in Compilation (1997)

[L] Metaprogramming Approaches in Programming Languages

  1. Bawden, A. Quasiquotation in Lisp, PEPM 1999
  2. Herman D., Wand M. A Theory of Hygienic Macros, ESOP 2008
  3. Taha W. , Sheard T. MetaML and Multi-Stage Programming with Explicit Annotations, PEPM 1997
  4. Sheard T, Jones S. P., Template Metaprogramming for Haskell, ACM SIGPLAN Workshop on Haskell (2002)
  5. Czarnecki K., Eisenecker U. W. Static Metaprogramming in C++, Generative Programming: Methods, Tools, and Applications, Chapter 8 (2000)
  6. Rompf T., Odersky M.Lightweight Modular Staging: A Pragmatic Approach to Runtime Code Generation and Compiled DSLs, GPCE 2010

[B] Binding-Time Analysis

  1. Consel C. Binding-Time Analysis for Higher Order Untyped Functional Languages, LFP 1990
  2. Sheard T., Linger N. Binding-Time Analysis for MetaML via Type Inference and Constraint Solving, TACAS 2004

[A] Applications

  1. Chafi H. et al. A Domain-Specific Approach To Heterogeneous Parallelism, PPoPP 2011
  2. DeVito Z. et al. Terra: A Multi-Stage Language for High-Performance Computing, PLDI 2013