Page MenuHomePhabricator

[analyzer][WIP] A Python script to simplify the ExplodedGraph dumps

Authored by Charusso on May 28 2019, 3:39 PM.




  • Hides duplicated information.
  • The full information appears on mouse-hover event.
  • Removes extra 'text' tags.

Diff Detail

Event Timeline

Charusso created this revision.May 28 2019, 3:39 PM
Charusso marked an inline comment as done.May 28 2019, 3:44 PM

Pre-alpha release as it is already too huge.


Somehow we have to inject those special characters instead. At the moment HTML crashes with errors if they occur.

The spacing and the indentation is another story, I can handle it easily: just I have to inject the string from our representation.


NoQ added a comment.May 28 2019, 6:47 PM

I asked you to publish this, but once i saw it, i realized that there are a lot more plans in my had that i already put into my work on this subject. I was imagining a data structure to manipulate graph dumps in more sophisticated manners, like filtering by state data or cutting out specific paths (the latter may be useful even for trimmed graphs), which i already have a more-or-less working sketch for. Therefore i'll ask you to let me in first to initiate this script, and later have you update it with your code.

A few high-level ideas anyway:

  • This should go into utils rather than tools, because it's a utility for developers of Clang itself, not a user-facing tool.
  • Python scripts in LLVM follow python coding guidelines, such as four spaces indentation.
  • We'll have to use difflib or something like that for producing diffs because it's not that trivial. I think you're currently losing the information about when does something disappear from the state, which is often important, so i ideally hope to have a +/- diff-like print.
Charusso marked an inline comment as done.May 29 2019, 7:05 AM
Charusso added inline comments.

Solved by D62087.

By which prevents build-bot and other developer build-break the JSON-support is final.

@NoQ, I am looking forward for that patch!

Charusso abandoned this revision.Jun 24 2019, 10:06 AM

It will continue its life as a sub-project of D62761.