An integrated implementation framework for compile-time metaprogramming

Authors

  • Yannis Lilis,

    Corresponding author
    1. Institute of Computer Science, Foundation for Research and Technology - Hellas, Heraklion, Crete, Greece
    • Correspondence to: Yannis Lilis, Institute of Computer Science, Foundation for Research and Technology - Hellas, Heraklion, Crete, Greece.

      E-mail: lilis@ics.forth.gr

    Search for more papers by this author
  • Anthony Savidis

    1. Institute of Computer Science, Foundation for Research and Technology - Hellas, Heraklion, Crete, Greece
    2. Computer Science Department, University of Crete, Heraklion, Crete, Greece
    Search for more papers by this author

Summary

Compile-time metaprograms are programs executed during the compilation of a source file, usually targeting to update its source code. Even though metaprograms are essentially programs, they are typically treated as exceptional cases without sharing common practices and development tools. Toward this direction, we identify a set of primary requirements related to language implementation, metaprogramming features, software engineering support, and programming environments and elaborate on addressing these requirements in the implementation of a metaprogramming language. In particular, we introduce the notion of integrated compile-time metaprograms, as coherent programs assembled from specific metacode fragments present in the source code. We show the expressiveness of this programming model and illustrate its advantages through various metaprogram scenarios. Additionally, we present an integrated tool chain, supporting full-scale build features and compile-time metaprogram debugging. Copyright © 2013 John Wiley & Sons, Ltd.

Ancillary