|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectsoot.toolkits.graph.BlockGraph
soot.toolkits.graph.ExceptionalBlockGraph
Represents a CFG where the nodes are Blocks and the
edges are derived from control flow. Control flow associated with
exceptions is taken into account: when a Unit may throw
an exception that is caught by a Trap within the
Body, the excepting Unit starts a new basic
block (Units do not start a new block when all the exceptions
they might throw would escape the method without being caught).
| Nested Class Summary | |
static class |
ExceptionalBlockGraph.ExceptionDest
|
| Constructor Summary | |
ExceptionalBlockGraph(Body body)
Constructs an ExceptionalBlockGraph for the
blocks found by partitioning the the units of the provided
Body instance into basic blocks. |
|
ExceptionalBlockGraph(ExceptionalUnitGraph unitGraph)
Constructs a graph for the blocks found by partitioning the the Units in an ExceptionalUnitGraph. |
|
| Method Summary | |
protected Map |
buildBlocks(Set leaders,
UnitGraph uncastUnitGraph)
A utility method that does most of the work of constructing basic blocks, once the set of block leaders has been determined, and which designates the heads and tails of the graph.
|
List |
getExceptionalPredsOf(Object b)
Returns a list of nodes which are predecessors of a given node when only exceptional control flow is considered. |
List |
getExceptionalSuccsOf(Object b)
Returns a list of nodes which are successors of a given node when only exceptional control flow is considered. |
Collection |
getExceptionDests(Object b)
Returns a collection of ExceptionDest
objects which represent how exceptions thrown by a specified
node will be handled. |
List |
getUnexceptionalPredsOf(Object b)
Returns a list of nodes which are predecessors of a given node when only unexceptional control flow is considered. |
List |
getUnexceptionalSuccsOf(Object b)
Returns a list of nodes which are successors of a given node when only unexceptional control flow is considered. |
| Methods inherited from class soot.toolkits.graph.BlockGraph |
computeLeaders, getBlocks, getBody, getHeads, getPredsOf, getSuccsOf, getTails, iterator, size, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface soot.toolkits.graph.ExceptionalGraph |
getBody |
| Methods inherited from interface soot.toolkits.graph.DirectedGraph |
getHeads, getPredsOf, getSuccsOf, getTails, iterator, size |
| Constructor Detail |
public ExceptionalBlockGraph(Body body)
Constructs an ExceptionalBlockGraph for the
blocks found by partitioning the the units of the provided
Body instance into basic blocks.
Note that this constructor builds an ExceptionalUnitGraph internally when splitting body's
Units into Blocks. Callers who already have
an ExceptionalUnitGraph to hand can use the constructor
taking an ExceptionalUnitGraph as a parameter, as a
minor optimization.
body - The underlying body we want to make a graph for.public ExceptionalBlockGraph(ExceptionalUnitGraph unitGraph)
Units in an ExceptionalUnitGraph.
unitGraph - The ExceptionalUnitGraph whose
Units are to be split into blocks.| Method Detail |
protected Map buildBlocks(Set leaders,
UnitGraph uncastUnitGraph)
A utility method that does most of the work of constructing basic blocks, once the set of block leaders has been determined, and which designates the heads and tails of the graph.
BlockGraph provides an implementation of
buildBlocks() which splits the Units in
unitGraph so that each Unit in the
passed set of block leaders is the first unit in a block. It
defines as heads the blocks which begin with
Units which are heads in unitGraph,
and defines as tails the blocks which end with
Units which are tails in unitGraph.
Subclasses might override this behavior.
This implementation calls the inherited implementation to split
units into blocks, before adding the distinctions between
exceptional and unexceptional control flow.
buildBlocks in class BlockGraphleaders - Contains Units which are
to be block leaders.uncastUnitGraph - Provides information about the predecessors and
successors of each Unit in the Body,
for determining the predecessors and successors of
each created Block.
Map from Units which begin or end a block
to the block which contains them.public List getUnexceptionalPredsOf(Object b)
ExceptionalGraph
getUnexceptionalPredsOf in interface ExceptionalGraphb - The node whose predecessors are to be returned.
List of the nodes in this graph from which
there is an unexceptional edge to n.public List getUnexceptionalSuccsOf(Object b)
ExceptionalGraph
getUnexceptionalSuccsOf in interface ExceptionalGraphb - The node whose successors are to be returned.
List of nodes in this graph to which
there is an unexceptional edge from n.public List getExceptionalPredsOf(Object b)
ExceptionalGraph
getExceptionalPredsOf in interface ExceptionalGraphb - The node whose predecessors are to be returned.
List of nodes in this graph from which
there is an exceptional edge to n.public List getExceptionalSuccsOf(Object b)
ExceptionalGraph
getExceptionalSuccsOf in interface ExceptionalGraphb - The node whose successors are to be returned.
List of nodes in this graph to which
there is an exceptional edge from n.public Collection getExceptionDests(Object b)
ExceptionalGraphExceptionDest
objects which represent how exceptions thrown by a specified
node will be handled.
getExceptionDests in interface ExceptionalGraphb - The node for which to provide exception information.
ExceptionDest objects describing
the traps and handlers, if any, which catch the exceptions
which may be thrown by n.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||