Page MenuHomePhabricator

[analyzer] exploded-graph-rewriter: NFC: Replace explorers with trimmers.
ClosedPublic

Authored by NoQ on Fri, Jul 26, 12:36 PM.

Details

Summary

Explorers aren't the right abstraction. For the purposes of displaying svg files we don't care in which order do we explore the nodes. We may care about this for other analyses, but we're not there yet.

The function of cutting out chunks of the graph is performed poorly by the explorers, because querying predecessors/successors on the explored nodes yields original successors/predecessors even if they aren't being explored.

Introduce a new entity, "trimmers", that do one thing but to it right: cut out chunks of the graph. Trimmers mutate the graph, so stale edges aren't even visible to their consumers in the pipeline. Additionally, trimmers are intrinsically composable: multiple trimmers can be applied to the graph sequentially.

Refactor the single-path explorer into the single-path trimmer. Rename the test file for consistency.

Diff Detail

Event Timeline

NoQ created this revision.Fri, Jul 26, 12:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptFri, Jul 26, 12:36 PM
Charusso accepted this revision.Fri, Jul 26, 12:52 PM

In my mind an explorer would trim me a graph so I like the new abstraction to differentiate the two. Thanks!

clang/utils/analyzer/exploded-graph-rewriter.py
892

from the root. duplicated from the above line.

This revision is now accepted and ready to land.Fri, Jul 26, 12:52 PM
NoQ marked an inline comment as done.Fri, Jul 26, 12:55 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptTue, Aug 13, 4:05 PM