News for hackers. Stuff that matters.
Re:D3-dag – Layout algorithms for visualizing directed acyli... by pbiggar on Sunday September 09, 2018 @01:07PM (#17946761)
I've always found it incredibly challenging to layout control-flow graphs (used a lot by compilers), so nice that this exists!
Re:D3-dag – Layout algorithms for visualizing directed acyli... by Someone on Sunday September 09, 2018 @01:16PM (#17946808)
I don’t understand that remark. This library is for directed acyclic graphs. Control flow graphs are directed, but generally have cycles.
Re:D3-dag – Layout algorithms for visualizing directed acyli... by pbiggar on Sunday September 09, 2018 @01:36PM (#17946890)
Yes, there are cycles, but you want to draw them as DAGs because the "backlink" (the thing that loops back up to the entry point of a loop) isn't on the same footing as the rest of edges.
Re:D3-dag – Layout algorithms for visualizing directed acyli... by Someone on Monday September 10, 2018 @04:22AM (#17950254)
The layout still needs to make room for the back links, doesn’t it? Thinking of that, with CFGs, you know which edges are backlinks, so you can put the backlinks in in reverse direction, do the layout, and then draw them with the arrow heads at the “wrong” side.

So, yes, I see that it can be useful.

Re:D3-dag – Layout algorithms for visualizing directed acyli... by DoofusOfDeath on Sunday September 09, 2018 @01:49PM (#17946940)
It's sometimes helpful, during program analysis, to collapse each strongly-connected component (SCC) of a directed graph into a single placeholder node representing that SCC.

When you do this, you're guaranteed that the resulting graph is acyclic.