
Francis Maes.
Metagene, a C++ meta-program generation tool.
CSI Seminar May 2003
The C++ disposes of a two-layer evaluation model. Therefore it is possible to evaluate a program in two steps: the so-called static and dynamic evaluations.
Programs executed statically - metaprograms - are written in C++ through an intensive use of template classes. Due to the verbosity of these structures, very few peoples really use C++ metaprograms. Metagene is a program-transformations tool which intent is to simplify the development of such particular programs. Because of similarities between C++ metaprogramming and fonctional programming, the chosen input language is an CAML-style one. As output, Metagene produces C++ metaprograms expressed with template classes.
Firstly we introduces Metagene. This is followed by the Metagene generation paradigm, showing how C++ metaprogramming is near to functional programming. Then we will see our additions to the core language in order to manipulate C++ structures. At this point we will be able to see some full Metagene examples. Finally we will discuss about applications and possible extensions of Metagene.
to top