Copyright © 2008 -2011 Gordon Woodhull
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Table of Contents
MPL.Graph is a proposed Boost library for creating and traversing metadata graphs at compile time.
Graph data structures and algorithms are applicable at compile time for a variety of purposes. Not only does this allow for "perfectly" efficient implementations which do not waste runtime cycles on abstractions, but it can make it possible to implement patterns which would be too complex and error-prone in an ad-hoc manner.
Some examples of familiar compile-time graphs:
Some constructs have graph structure that is partly compile-time and partly run-time:
Metaprogramming these constructs allows analysis with graph algorithms, and production from computed graphs. Specification and analysis using compile-time graphs avoids wasting runtime cycles on abstractions, and improves conceptual clarity and abstraction (once the "meta" barrier is hurdled).
So far, MPL.Graph provides compile-time versions of BGL's incidence_list and adjacency_list, and the algorithms breadth_first_search and depth_first_search.
It is used in MSM (where it is currently a sub-library) for identifying regions (connected components) and unreachable states.
Last revised: January 18, 2011 at 00:13:38 GMT