Title :
Visualization of C++ Template Metaprograms
Author :
Borók-Nagy, Zoltán ; Májer, Viktor ; Mihalicza, József ; Pataki, Norbert ; Porkoláb, Zoltán
Author_Institution :
Dept. of Programming Languages & Compilers, Eotvos Lorand Univ., Budapest, Hungary
Abstract :
Template metaprograms have become an essential part of today´s C++ programs: with proper template definitions we can force the C++ compiler to execute algorithms at compilation time. Among the application areas of template metaprograms are the expression templates, static interface checking, code optimization with adaptation, language embedding and active libraries. Despite all of its already proven benefits and numerous successful applications there are surprisingly few tools for creating, supporting, and analyzing C++ template metaprograms. As metaprograms are executed at compilation time they are even harder to understand. In this paper we present a code visualization tool, which is utilizing Tem plight, our previously developed C++ template metaprogram debugger. Using the tool it is possible to visualize the instantiation chain of C++ templates and follow the execution of metaprograms. Various presentation layers, filtering of template instances and step-by-step replay of the instantiations are supported. Our tool can help to test, optimize, maintain C++ template metaprograms, and can enhance their acceptance in the software industry.
Keywords :
C++ language; data visualisation; program compilers; program debugging; C++ compiler; C++ template metaprogram debugger; C++ template metaprogram visualization; active libraries; code optimization; code visualization tool; expression templates; language embedding; static interface checking; tem plight; Context; Data structures; Debugging; Instruments; Libraries; Programming; Visualization; C++ template metaprogram; code comprehension;
Conference_Titel :
Source Code Analysis and Manipulation (SCAM), 2010 10th IEEE Working Conference on
Conference_Location :
Timisoara
Print_ISBN :
978-1-4244-8655-7
DOI :
10.1109/SCAM.2010.16