This page gives some links to related work. You can find other references in Metagene paper.
C++ meta-programming libraries
MPL (A. Gurtovoy) is a C++ template meta-programming frame-work of compile-time algorithms, part of the Boost package. This library provides common compile-time operations such as tests and sequences manipulation, and some simple compile-time types. The code generated by Metagene is very close to the code written when using MPL.
Boost also includes two other libraries dedicated to template meta-programming:
static assert (compile-time assertions) and
type traits (types properties Maddock and al.). These libraries could be usefull when programming with Metagene.
Expression Templates
The Expression Templates technique (Veldhuizen 1995) has a central place in C++ meta-programming. This technique allows to build compile-time abstract syntax trees, what is useful in many C++ meta-programs. This technique is generally used to transform C++ statements into equivalent (but more efficient) statements. Its implementation in C++ is essentially based on operators overloading and template classes techniques. Unfortunately, this technique suffers from its perceived complexity.
To solve this problem, the PETE project (Crotinger et al.) generates all the necessary C++ code for using a particular case of Expression Templates. PETE is highly specialized in this technique, and offers only a few general C++ meta-programming tools. Expression Templates and tools such as PETE can be used to build input data to Metagene programs.
Libraries using C++ meta-programming
C++ template meta-programming is now at the heart of highly efficient (Haney and Crotinger) scientific container libraries like POOMA (Crotinger et al.) - Parallel Object-Oriented Methods and Applications - and Blitz++ (Veldhuizen and al.).
- Functional programming in C++
-
- FACT! library (Striegnitz and Smith), built on top of PETE, provides typical functional features such as currying, lambda expressions and lazy evaluation in C++.
-
- FC++ (McNamara? and Smaragdakis) is a similar library inspired by the Haskell language.
- Other libraries using C++ meta-programming
Some other libraries are based on C++ meta-programming such as
Spirit (The Spirit group), which uses Expression Templates for building parsers. Most of these quoted libraries could have been written using Metagene.
Previous work
C++ meta-programming can be used for manipulation of compile-time abstract trees. Using such techniques, we showed in a
previous work (Maes 2003) how to transform fully featured programs written in Tiger (Appel 1997) into effective C++ code. This work was an extension of usual Expression Templates, and required a large quantity of hard-to-maintain C++ template meta-code.
- Metagene, Metagene main page.
- Introduction, An introduction to the Metagene project.
- History: preliminary examples, Some examples showing the equivalence between C++ meta-programming and functionnal programming.
- History: generation paradigm, The generation paradigm and its history.
- Metagene translation process, From functionnal expressions to class templates.
- Related work, Some related work.
- Download Metagene, Download the latest release of Metagene.
- Paper and Slides, A paper introduicing the Metagene project with corresponding slides.
- Possible extensions, Possible extensions to Metagene.
- Horror Show, The museum of C++ horrors.
--
FrancisMaes? - 19 Nov 2003
to top