[Soot-list] reverse control flow graph

Phil Pratt-Szeliga pcpratts at syr.edu
Mon Apr 2 11:46:15 EDT 2012


Hi Eric,

There is no way to get from a DirectedGraph<Unit> to a
DirectedGraph<Block>. I am going to submit a patch. Would you prefer
that I make a new InverseBlockGraph class that reverses preds and
succs or that I modify BlockGraph to also accept a DirectedGraph<Unit>
in a constructor in addition to a UnitGraph. I have done the first
solution easily in 68 lines of code.

The new constructor in BlockGraph would be like this:
public BlockGraph(DirectedGraph<Unit> graph, Body body){
so that retrieving the original body would still work in BlockGraph.getBody

Regards,
Phil Pratt-Szeliga

On Mon, Apr 2, 2012 at 11:30 AM, Eric Bodden <eric.bodden at ec-spride.de> wrote:
> Hi Phil.
>
> This should be as simple as:
>
> DirectedGraph<Unit> reversed = new
> soot.toolkits.graph.InverseGraph<Unit>(unitGraph);
>
> Hope that helps,
> Eric
>


More information about the Soot-list mailing list