Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#277 closed Bugs (None)

[BGL] Asymmetry between read_graphviz() and write_graphviz()

Reported by: nobody Owned by: Douglas Gregor
Milestone: Component: graph
Version: None Severity:
Keywords: Cc:

Description

During some experiments with the BGL-GraphViz 
interface, I observed a significant asymmetry between a 
given DOT graph input with boost::read_graphviz() and 
output with boost::write_graphviz() (without changing 
any attributes).

Given the input DOT file <metro.dot> (which is, of 
course, much longer with the full set of information), the 
elementary BGL program <metro.cxx> transforms this 
into the output DOT file <metro_boost.dot> (the three 
files are attached to this submission).

It seems that somewhere on the way, the graph and 
node (and edge) attributes get clobbered. Note that 
even the graph name "metro" gets replaced by the name 
of the (last) subgraph "ligne_1", and /all/ node attributes 
get mixed up. This seems to be somewhat similar to the 
recent edge-related problem posted by Hideaki Hiraki to 
the boost-users list.

I have not (yet) tried to mess with the graphviz parser 
code, so I am asking here for help. Thanks.

Greetings,
Andreas
<andreas dot scherer at rb-its dot de>

Change History (3)

comment:1 by Douglas Gregor, 18 years ago

Logged In: YES 
user_id=249098

This is indeed a big problem, and not one that is trivially solved. I expect 
we'll need a complete rewrite of the graphviz parser at some point to 
deal with this.

comment:2 by Douglas Gregor, 18 years ago

Status: assignedclosed
Logged In: YES 
user_id=249098

The CVS version of the BGL-GraphViz interface now contains a new 
GraphViz parser (based on Spirit) that can retain all attributes when 
parsing a graph, along with a writer that can reproduce those attributes. 


comment:3 by nobody, 18 years ago

Logged In: NO 

Great work! The new BGL-GraphViz interface works absolutely fine on 
my "Metro de Paris" graph, so I can re-start with this pet project. 
 
Many thanks to all involved! 
<andreas_freenet at freenet dot de > 
Note: See TracTickets for help on using tickets.