The C programming language
Multi-stage programming with explicit annotations
PEPM '97 Proceedings of the 1997 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
The C++ Programming Language
Template meta-programming for Haskell
Proceedings of the 2002 ACM SIGPLAN workshop on Haskell
C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (C++ in Depth Series)
Compile-time meta-programming in a dynamically typed OO language
DLS '05 Proceedings of the 2005 symposium on Dynamic languages
Debugging C++ template metaprograms
Proceedings of the 5th international conference on Generative programming and component engineering
Accomplishments and research challenges in meta-programming
SAIG'01 Proceedings of the 2nd international conference on Semantics, applications, and implementation of program generation
The D Programming Language
Dynamic imperative languages for runtime extensible semantics and polymorphic meta-programming
RISE'05 Proceedings of the Second international conference on Rapid Integration of Software Engineering Techniques
Self model-driven engineering through metaprograms
Proceedings of the 17th Panhellenic Conference on Informatics
Hi-index | 0.00 |
Compile-time meta-programming is an advanced language feature enabling to mix programs with definitions that are executed at compile-time and may generate source code to be put in their place. Such definitions are called meta-programs and their actual evaluation constitutes a compilation stage. As meta-programs are also programs, programmers should be supported in handling compile-time and runtime errors, something introducing challenges to the entire tool chain along two lines. Firstly, the source point of a compile error may well be the outcome of a series of compilation stages, thus never appearing within the original program. Effectively, the latter requires a compiler to track down the error chain across all involved stages so as to provide a meaningful, descriptive and precise error report. Secondly, every compilation stage is instantiated by the execution of the respective staged program. Thus, typical full-fledged source-level debugging for any particular stage should be facilitated during the compilation process. Existing implementations suffer in both terms, overall providing poor error messages, while lacking the required support to debug meta-programs of any staging depth. In this paper we firstly outline an implementation of a meta-programming system offering all mentioned facilities. Then, we detail the required amendments to the compilation process. Finally, we discuss the necessary interoperation points between the compiler and the tool-chain (IDE).