soot.toolkits.graph
Class BlockGraphConverter

java.lang.Object
  extended by 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
BlockGraphConverter()
           
 
Method Summary
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.
static void main(String[] args)
           
static void reverse(BlockGraph graph)
          Reverses a BlockGraph by making the heads tails, the tails heads and reversing the edges.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockGraphConverter

public BlockGraphConverter()
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)