This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] exploded-graph-rewriter: Implement bug nodes and sink nodes.
ClosedPublic

Authored by NoQ on Jul 2 2019, 4:10 PM.

Details

Summary

Add a label to nodes that have a bug report attached or on which the analysis was generally interrupted.

Fix printing has_report and implement printing is_sink in the graph dumper.

Diff Detail

Repository
rL LLVM

Event Timeline

NoQ created this revision.Jul 2 2019, 4:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 2 2019, 4:10 PM
Charusso accepted this revision.Jul 2 2019, 4:15 PM

I have removed that is_sink business because we have an actual graph, not just a huge painting, so you could mark whether it is sink by it has zero successors. I like the idea about refactoring that crazy code, thanks!

This revision is now accepted and ready to land.Jul 2 2019, 4:15 PM
NoQ added a comment.Jul 2 2019, 4:28 PM

Sink node is not the same thing as "zero successors". A sink node is a node in which termination was explictly requested as part of modeling, which is usually nice to know. A non-sink node may have no successors because it ran out of statements to execute (i.e., the analysis finishes successfully).

P.S. I don't have many more plans on implementing more prints in the exploded-graph-rewriter. I have plans to implement different Explorers (which would only visit a part of the graph). You should now be unblocked to take a look at the SVG stuff that you had (but pls keep it at a lower priority than the immediate GSoC stuff).

In D64110#1567505, @NoQ wrote:

A non-sink node may have no successors because it ran out of statements to execute (i.e., the analysis finishes successfully).

Ah, of course, sorry.

P.S. I don't have many more plans on implementing more prints in the exploded-graph-rewriter. I have plans to implement different Explorers (which would only visit a part of the graph). You should now be unblocked to take a look at the SVG stuff that you had (but pls keep it at a lower priority than the immediate GSoC stuff).

Thanks for your huge amount of work! "Hold my beer."

NoQ updated this revision to Diff 207687.Jul 2 2019, 6:24 PM

Fix the dump_egraph.c test (whoops).

NoQ marked an inline comment as done.Jul 2 2019, 6:25 PM
NoQ added inline comments.
clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
3009–3010 ↗(On Diff #207687)

The fix in test/Analysis/dump_egraph.c is related to this change. Previously multiple nodes in the dump were marked as "has_report": true and the CHECK directives were in a wrong order but went unnoticed.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 2 2019, 6:27 PM