| java.lang.Object soot.toolkits.graph.UnitGraph soot.toolkits.graph.TrapUnitGraph
All known Subclasses: soot.toolkits.graph.ClassicCompleteUnitGraph, soot.jbco.util.SimpleExceptionalGraph,
TrapUnitGraph | public class TrapUnitGraph extends UnitGraph (Code) | |
Represents a CFG for a
Body instance where the nodes are
Unit instances, and where, in additional to unexceptional
control flow edges, edges are added from every trapped
Unit to the
Trap 's handler Unit , regardless
of whether the trapped Unit s may actually throw the
exception caught by the Trap .
There are three distinctions between the exceptional edges added
in TrapUnitGraph and the exceptional edges added in
ExceptionalUnitGraph :
-
In
ExceptionalUnitGraph , the edges to
Trap s are associated with Unit s which
may actually throw an exception which the Trap
catches (according to the
soot.toolkits.exceptions.ThrowAnalysis ThrowAnalysis used in the
construction of the graph). In TrapUnitGraph , there
are edges from every trapped Unit to the
Trap , regardless of whether it can throw an exception
caught by the Trap .
-
In
ExceptionalUnitGraph , when a Unit may
throw an exception that is caught by a Trap there
are edges from every predecessor of the excepting
Unit to the Trap 's handler. In
TrapUnitGraph , edges are not added from the
predecessors of excepting Unit s.
-
In
ExceptionalUnitGraph , when a Unit may
throw an exception that is caught by a Trap , there
may be no edge from the excepting Unit itself to the
Trap (depending on the possibility of side effects
and the setting of the omitExceptingUnitEdges
parameter). In TrapUnitGraph , there is always an edge
from the excepting Unit to the
Trap .
|
Constructor Summary | |
public | TrapUnitGraph(Body body) Constructs the graph from a given Body instance. |
Method Summary | |
protected void | buildExceptionalEdges(Map unitToSuccs, Map unitToPreds) Method to compute the edges corresponding to exceptional
control flow. |
TrapUnitGraph | public TrapUnitGraph(Body body)(Code) | | Constructs the graph from a given Body instance.
Parameters: the - Body instance from which the graph is built. |
buildExceptionalEdges | protected void buildExceptionalEdges(Map unitToSuccs, Map unitToPreds)(Code) | | Method to compute the edges corresponding to exceptional
control flow.
Parameters: unitToSuccs - A Map from Units to Lists of Unit s. This is an “outparameter”; buildExceptionalEdges will add a mapping for every Unit within the scope of one or more Traps to a List of the handlerunits of those Trap s. Parameters: unitToPreds - A Map from Unit s to List s of Unit s. This is an“out parameter”;buildExceptionalEdges will add amapping for every Trap handler toall the Unit s within the scope ofthat Trap . |
|
|