Introspective C++

Files
index.pdf (673.65 KB)
Downloads: 845
TR Number
Date
2004-08-20
Journal Title
Journal ISSN
Volume Title
Publisher
Virginia Tech
Abstract

Introspection has become a significant language feature to enable new component technologies.

It enables such capabilities as runtime component discovery, new levels of component flexibility and change tolerance, dynamic reconfiguration and system self healing. Three levels of introspection are discussed: simple type identification, structural introspection, and behavioral introspection

The C++ programming language offers type identification, but neither structural or behavioral introspection. Through its use and combination of several language features, C++ has provided a flexible system for achieving some of the features of introspection without explicitly providing it. Features such as templates, operator overloading, polymorphism, and multiple inheritance have allowed software systems in C++ to build flexible components that tolerate change and support dynamic reconfiguration and self healing. The template system in particular has recently been shown to be more capable than expected, being Turing complete in its own right.

Despite their existing capabilities, the language features have their limits and would benefit from an introspective mechanism. Unlike traditional introspective systems that execute solely at run-time, Introspective C++ has chosen a compile-time approach that tightly integrates with the template mechanism. This approach enables interaction with the other language mechanisms during the compilation, enabling the resolution of many introspective questions before the compiled program is ever run. Furthermore, the mechanism can serve as a base for developing run-time introspective systems.

Description
Keywords
introspection, templates, metaprogramming, c++
Citation
Collections