miniblog.

← Back to all posts
119
I'm playing with DOT output for debugging syntax trees from difftastic. Here's an F# snippet, the Debug representation, and the DOT rendered as an image. I'm pleased with the information density on the graphic, but we'll see how often I end up using it.
PhotoPhotoPhotoPhotoPhotoPhoto

9 Comments

@wilfredh i developed graphviz output for each phase of my parser compiler and i think it's only a little more useful than text output but still probably worth doing
@hipsterelectron thingskatedid on Twitter speaks very highly of graphviz debugging, so I figured I'd give it a try :)
@wilfredh @hipsterelectron it's been invaluable for #mergiraf to display matchings between trees. But not very happy with the #graphviz-rust crate I used, it lacks basic things (such as escaping to make sure it produces a valid DOT file) and has many dependencies. I am considering hand-rolling it instead. Are you using any crate?
@hipsterelectron @pintoch Interesting! How well does it scale, i.e. at what point does it get so big that it's not useful? Also, I'd love to hear how you decided what details to include in the graph. What does the arrow colour signify?
@wilfredh @pintoch i also happen to be extremely good at scanning long sequences of text for differences (kind of a useless talent) so it's somewhat less useful for my own purposes, but it does make a very useful representation for others when i want to explain what's going on in my head. in the above image red arrows are stack cycles which are allowed but require an additional phase of analysis