das-labor / panopticon

A libre cross-platform disassembler.
https://panopticon.re
GNU General Public License v3.0
1.43k stars 80 forks source link

Replace Call Graph Widget #87

Open flanfly opened 8 years ago

flanfly commented 8 years ago

The call graph display is slow, buggy and has limited use. We will replace it with something similar to then Binnavi Proximity graph. The graph shows all selected functions and their neighboring functions and all references to/from the function. Neighbors can be clicked to reveal their respective neighbors and so on. Nodes are lay out using a force directed layout. After starting Panopticon shows only the entry points. Double clicking a function opens it.

flanfly commented 7 years ago

I wrote a mockup and used ForceAtlas2 for laying out the graph. The problem is that adding a node and removing it later did not return the graph to the initial layout. This made following changes a bit hard. Also force-directed layouting tends to be quite slow. Our qml wrapper does not allow to update UI values from inside threads, so continuously updating the layout is a hassle and extremely slow.

Then I tried a circular variant of layered graph drawing [1]. This had similar problems with the layout not being deterministic. It also looked ugly and was large than necessary.

One thing I still want to try is to use a simple area-aware, circular tree drawing algorithm. Proximity graphs are pretty much always trees. Even if they aren't, the user selects nodes along a path that is the spanning tree of the graph. I'm not sure whenever I should draw the non-tree edges or just omit them.

Anyway, this experiment has been going for too long. I'll stop working on it until Bridewell is release. Input is welcome.

1: Christian Bachmaier and Michael Forster: A Radial Adaptation of the Sugiyama Framework for Hierarchical Graph Drawing, April 2006