This is an archive of the discontinued LLVM Phabricator instance.

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

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

Details

Summary

Features:

  • 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.

clang/tools/static-analyzer/exploded-graph-rewriter.py
200

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.

Example:

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.
clang/tools/static-analyzer/exploded-graph-rewriter.py
61

Solved by D62087.

By https://github.com/llvm/llvm-project/commit/ee37e28fd1c670ecabea64a15b9cc8698ca62b86 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.