Package soot.toolkits.graph
Class BlockGraphConverter
- java.lang.Object
-
- soot.toolkits.graph.BlockGraphConverter
-
public class BlockGraphConverter extends Object
This utility class can convert any BlockGraph to a single-headed and single-tailed graph by inserting appropriate Start or Stop nodes. It can also fully reverse the graph, something that might be useful e.g. when computing control dependences with a dominators algorithm.Note: This class may be retracted in a future release when a suitable replacement becomes available.
- Author:
- Navindra Umanee
-
-
Constructor Summary
Constructors Constructor Description BlockGraphConverter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddStartStopNodesTo(BlockGraph graph)Transforms a multi-headed and/or multi-tailed BlockGraph to a single-headed singled-tailed BlockGraph by inserting a dummy start and stop nodes.static voidmain(String[] args)static voidreverse(BlockGraph graph)Reverses a BlockGraph by making the heads tails, the tails heads and reversing the edges.
-
-
-
Method Detail
-
addStartStopNodesTo
public static void addStartStopNodesTo(BlockGraph graph)
Transforms a multi-headed and/or multi-tailed BlockGraph to a single-headed singled-tailed BlockGraph by inserting a dummy start and stop nodes.
-
reverse
public static void reverse(BlockGraph graph)
Reverses a BlockGraph by making the heads tails, the tails heads and reversing the edges. It does not change the ordering of Units in individual blocks, nor does it change the Block labels. This utility could be useful when calculating control dependences with a dominators algorithm.
-
main
public static void main(String[] args)
-
-