arporter / habakkuk

Fortran code analysis for performance prediction
11 stars 0 forks source link

Use python bindings to graphviz to generate dag output #30

Open arporter opened 7 years ago

arporter commented 7 years ago

Currently Habakkuk contains code to generate a dot-format file for use with graphviz. However, graphviz has an eponomously-titled python package and it would be better if we used that. We can probably make it optional so as to avoid having a mandatory dependence on graphviz (i.e. habakkuk is still useful, even if graphviz is not installed).

arporter commented 7 years ago

Related to this, my manually-generated dot-format output contains duplication (both of nodes and of edges). e.g. If I construct a dag like so:

dag = dag_from_strings(["a = b * c", "d = b/c", "e = d * b"])

then the resulting dot file contains:

node139895363613456 [label="b (w=0)", color="black", shape="ellipse", style="filled", 
                     fillcolor="grey"]
node139895363613456 -> {
 node139895363615632 node139895361500048 node139895361499984}

twice!