alt-romes / hegg

Fast equality saturation in Haskell
https://hackage.haskell.org/package/hegg
BSD 3-Clause "New" or "Revised" License
75 stars 8 forks source link

Visualizing e-graphs with graphviz #26

Open alt-romes opened 1 year ago

alt-romes commented 1 year ago

At some point in the development process there was a backend that allowed an e-graph to be rendered as a graphviz graph. This was imensely useful until I started bumping into some bugs with the original implementation, which made it less useful.

Unfortunately it fell out of date during the evolution of the project, so it no longer compiles (Data.Equality.Graph.Dot, that is conditionally compiled when using -f+vizdot)

I think we should rewrite this backend, as it can be imensely useful for users debugging their e-graphs and representations.

BinderDavid commented 10 months ago

I tried cabal build -f vizdot and currently run into the problem documented here https://github.com/ivan-m/graphviz/issues/54 (with GHC 9.4.5) Maybe graphviz needs to first be fixed upstream?

BinderDavid commented 10 months ago

Ok, I'll pick this up and get it working again, since I also find it super useful for debugging :)

alt-romes commented 10 months ago

Thanks David, I'm happy to hear so. It might be useful to look at the egg rust implementation of the graphviz printer, as they have already figured some of it out.

(I'm also curious about what you're working on, but we'll get the chance to talk about it at the end of the week, hopefully 😉)