NoQ added a comment.

I love such debugging facilities! They're a massive boost to developer 
productivity compared to ad-hoc debug prints, and they allow new contributors 
to study how the tool works. I'm excited to see how this thing turns out.

In the static analyzer's path-sensitive engine we've settled on a Graphviz 
printout of the analysis graph, with an extra python script to filter and 
"prettify" it. In our case these graphs are much larger than CFGs (on 
real-world code they often contain over 200000 nodes) so filtering and 
searching becomes essential. And we usually don't have an option to debug a 
reduced toy example, because it's typically very hard to define the notion of 
"false positive" in a way suitable for a `creduce` predicate, and even when 
reducing manually it's easy to miss the point entirely and end up with a 
completely different problem. So we had to learn how to deal with these massive 
graphs, and these days we're pretty good at that. In your case the graphs 
probably aren't that massive, but other considerations probably still apply.

I found textual CFG dumps of real-world functions to be very hard to read; it's 
annoying to figure out in which order you're supposed to read the blocks. Most 
of the time I prefer Graphviz dumps of the CFG. If you're stuck with real-world 
code as much as we are in the static analyzer, it might be very convenient to 
somehow include a graphical representation of the CFG alongside your reports. 
Given that CFGs are relatively small, you might be able to get away with an 
ad-hoc graph visualizer scripted into your HTML page, so that to avoid relying 
on Graphviz.

Then I guess you can try adding your abstract state information directly to the 
graphical CFG blocks, and build a timeline of such partially analyzed CFGs, 
from the starting state to the fully converged state, brightly highlighting 
changes made on every step 🤔Dunno, just dreaming at this point.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144730/new/

https://reviews.llvm.org/D144730

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to