Subject: [boost] [metagraph] mpl_graph is now useable
From: Gordon Woodhull (gordon_at_[hidden])
Date: 2008-09-23 02:25:04
I recently posted to the sandbox a decent refactoring of the mpl_graph
part of the Metagraph libraries I'm working on.
mpl_graph is bgl-like graph metadata & metafunctions.
Now there are two implementations - an adjacency list and an incidence
list. That is, you can supply metadata in either of those formats and
get full graph API access through metafunctions. Depth first search
is also provided.
Each capability that you access causes the library to create the
corresponding indexing for the graph - that is, you pay for generating
the relevant efficient metadata structure whenever you use a
capability (or roughly, a concept).
I think that each of the two previously reviewed libraries, FSM and
Dataflow, could possibly benefit from mpl_graph.
For FSM, this could be a nice input format, e.g. by supplying state
data in the vertex types, and event action in the edge types.
For the statically-generated Dataflow which Stjepan mentioned (not the
version which was reviewed), a metadata graph could also be a nice
input format, from which it would be possible to generate the call
graph somewhat directly. Note that this allows templated functions to
be called in combinatorial ways, generating some pretty complex code
from a simple graph. But I'm getting ahead of myself (again).
The big point is that there are all kinds of graphs in our code and
data: generating code and data from metadata graphs is thus something
we want to do.
I'll work up some documentation once I get the doc toolchain working -
in the meantime, please look at the examples,
I intend to do some profiling to see the complexity of the compile-
time speed - it's noticeable but tolerable for small examples, on
gcc. On msvc++, it's kinda slow, getting up toward a minute for a
couple of examples. I don't yet know if this technique is viable for
large compile-time graphs.
mpl_graph is the first layer of the Metagraph stuff I've been going on
about. This is just compile-time metadata graphs: mpl_graph is not
the actual Metagraph compile-and-runtime data structure which started
me on this quest, it's what makes that possible.