[Haskell-cafe] ANNOUNCE: graphviz-2999.0.0.0

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Sat Jul 18 10:23:07 EDT 2009

I am pleased to announce a new release of the graphviz package for
Haskell, which provides bindings to the GraphViz [1] suite of tools.

[1] http://www.graphviz.org/

Probably the biggest and most important change in this release is that
AFAICT, all 152 attributes utilised/supported by GraphViz [2] are now
specified and supported by this library.  However, I'm not fully sure
how well the parsing of these attributes will turn out; if you notice a
bug/problem then please let me know.

[2] http://graphviz.org/doc/info/attrs.html

I've specified this as being the first in the 2999.0 series of
releases.  I will switch to 3000.0 when the generic graph class has been
released and graphviz switched to using it rather than just FGL.

One other future change that I'm considering is to improve the parsing
ability of the Dot language.  At the moment, graphviz assumes the
following layout is followed:
  * Graph attributes
  * Nodes with their attributes (clusters are supported only for
    creation, not parsing).
  * Edges with their attributes.
To match the behaviour of upstream, this will need to be changed into
just a list of statements, where a statement is one of five things [3]:
  * A Node
  * An Edge
  * An attribute (either for the graph overall, nodes or for edges)
  * "ID '=' ID" (not quite sure what this is; some kind of assignment)
  * A subgraph (clusters are a specific type of subraph)
As the way of defining an attribute for a specific grouping of
nodes/edges/subgraphs is to have them all listed after the attribute
definition (whereas those beforehand do not have this attribute), the
imperative nature of the Dot language does not allow us to split these
statements up as we currently do.

[3] http://graphviz.org/doc/info/lang.html

As such, I'm asking which of the following two choices people would
  1. Follow upstream so that it can fully parse a Dot graph
  2. Keep it as it is, so that it is possible to consider all edges,
     etc. easily.

Other major changes to this release:

* Fixed a bug where the Show instance and read function for DotEdge
  had the from/to nodes the wrong way round.  This was not immediately
  noticed since the Graph -> DotGraph functions created them the wrong
  way round, so for those users who only used these this was not
  apparent.  Spotted by Neil Brown.

* Greatly improved Attribute usage: almost all attributes are now
  covered with allowed values.

* Extend DotGraph to include whether a graph is strict or not and if
  it has an ID.  Also move the directedGraph field.

* Make "Dot" refer to the actual dot command and DotArrow refer to the
  ArrowType (rather than DotCmd and Dot as before).

* Make the Data.GraphViz.ParserCombinators module available to end
  users again, but not re-exported by Data.GraphViz; it has a warning
  message up the top not to be used.  It is there purely for
  documentative purposes.

* Use extensible-exceptions so that base < 4 is once again supported.

* Follow the PVP rather than using dates for versions:

Note that this means that any library/application using more than a
trivial sub-set of graphviz will most likely need to be updated.
However, now that the PVP is being followed it should be easier to tell
in future when updates will be required.

Other items I'm wanting to do in future releases:

* Allow user to choose whether or not the graph is meant to be
  directed or undirected.

* Improve parsing to fully (or at least follow more closely) support Dot.

* Improve clustering/subgraph support.

* Use a PrettyPrinter rather than Show to generate Dot output.

* Improve Output support.

* Find and fix the handle closing bug with graphvizWithHandle.

Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com

More information about the Haskell-Cafe mailing list