From: Eric M. Ludlam <eric@si...> - 2009-04-06 03:12:19
I wanted to post about some updates to COGRE. It has captured my
attention lately, and has been progressing nicely.
This time it is about graphviz integration. The Cogre directory has
had a dot language parser for quite some time. I updated it to work
with the latest graphviz-dot-mode (now required for the below
features.) and also for the latest graphviz software. If you get
these pieces, then you can do the below.
First, COGRE can now convert a graph into the graphviz dot language.
It is doing the conversion by transforming the graph into a Semantic
Tags format. It then uses SRecode to write the code. That makes this
the first big application to use the SRecode code generation based on
semantic tags. Nifty! This infrastructure means it is a couple
fairly simple step away from being able to generate C++, or code for
any other OO language. Extra nifty.
As a bonus, once you convert into dot, you might as well call dot,
so there is an export to png, and a postscript print option for your
What about the round-trip? Round-tripping is an important piece of
any case tool, as COGRE would like to be. Another new feature to
exercise that is a graph layout option. This option will take all the
nodes in your COGRE graph, and move them around in a nice way.
It does this by converting to dot, and running dot in a way that
produces the layout back in another dot file. The dot parser extracts
the positioning information, and that is applied back to the COGRE
These are all fairly simple operations, but it is a great
proof-of-concept for the framework I'd like to eventually build here.
That, and the layout engine was something sorely missing for any
auto-generated UML diagram.
Eric Ludlam: eric@...
Siege: http://www.siege-engine.com Emacs: http://cedet.sourceforge.net