Public Methods | |
BuildPDG (MethodInfo mdInfo, AnnotationManager cfanns) | |
BitSet | controlNodesOf (Stmt st) |
Set | controlSuccNodesOf (Stmt stmt) |
Set | dataNodesOf (Stmt st) |
Set | dataSuccNodesOf (Stmt stmt) |
Map | getCdMap () |
Map | getDdMap () |
Set | getInstanceFieldDefStmtList () |
Map | getInterferenceMap () |
LockAnalysis | getLockAnalysis () |
Map | getReadyDependMap () |
int | immediatePostdominatorOf (int stmtIndex) |
int | immediatePostdominatorOf (Stmt stmt) |
BitSet | postdominatorsOf (Stmt stmt) |
BitSet | postdominatorsOf (Integer stmtIndex) |
BitSet | preDivergencePointsOf (Stmt stmt) |
void | setInterferenceMap (Map iterMap) |
void | setLockAnalysis (LockAnalysis la) |
void | setReadyDependMap (Map rm) |
BitSet | succDivergencePointsOf (Stmt stmt) |
String | toString () |
Static Public Methods | |
Set | fieldRefToSootField (Set refSet) |
Integer | indefiniteFrom (AnnotationManager cfanns, MethodInfo mdInfo) |
boolean | mayPointToTheSameRef (Value v1, Value v2, SootMethod enclosingMethod1, SootMethod enclosingMethod2) |
boolean | mayPointToTheSameRef (Value v1, Set vs, SootMethod enclosingMethod1, SootMethod enclosingMethod2) |
Private Methods | |
void | cdAnalysisForReturnOfInit () |
void | cdAnalysisForStmtsInCatch () |
void | collectInstanceFieldDefStmt () |
Set | collectVarsDefined (Set defStmtList) |
Map | computeImmedDom (Map stmtToBitSet) |
void | controlDependAnalysis () |
boolean | dataBoxesContains (Set dataBoxes, Stmt stmt) |
void | dataDependAnalysis () |
void | dataDependOfInstanceFieldRef (InstanceFieldRef insfr, Stmt stmt, Set ddList) |
void | dataDependOfStaticFieldRef (StaticFieldRef staticVariable, Stmt stmt, Set ddList) |
void | ddForArray (Set ddList, Stmt stmt, Local arrayLocal) |
void | ddForParameters () |
void | ddForStaticAndInstanceFd () |
Set | defsNotPreserves (int staticDefIndex) |
void | dependency () |
void | divergenceDependenceAnalysis () |
void | domination () |
Stmt | getConditionalStmtFrom (Stmt[] testStmts) |
Map | getDivergenceMap () |
Set | getHandlerStmtSet () |
int | getInstanceDefIndexOf (Stmt s) |
Set | getRefsWithCommonField (Set vars, SootField sootField) |
Stmt | getSpecialInvokeStmtOf (DataBox ddBoxWithNewExpr, SootClass newClass) |
Stmt | getSpecialInvokeStmtOf (DataBox ddBoxWithNewExpr, String typeOfNewExpr) |
int | getStaticDefIndexOf (Stmt s) |
void | immediateDominators () |
LinkedList | initializeWorkList (AnnotationManager cfanns) |
Set | instanceDefsNotPreserves (int instanceDefIndex) |
void | postDomAnalysis () |
void | postdomFixPoint (LinkedList workList) |
BitSet | postdominatorsOf (int index) |
void | prepareToBuild (MethodInfo mdInfo) |
void | reachingDefOfInstanceField () |
void | reachingDefOfStaticField () |
List | removeExceptionCaught (List actualSuccs) |
void | specialInvokeDdAnalysis () |
Static Private Methods | |
Set | cloneAndChangeBase (Set original, Value base) |
Private Attributes | |
BitSet | exitNodes |
MethodInfo | methodInfo |
Map | stmtToPostdoms |
Map | stmtToImmedPostdom |
StmtList | stmtList |
StmtGraph | stmtGraph |
JimpleBody | jimpleBody |
BitSet | staticReachDef [] |
BitSet | instanceReachDef [] |
LockAnalysis | lockAnalysis = null |
Map | readyDependMap = null |
Map | interferenceMap = null |
Map | callSiteMap = null |
BitSet | exitNodesNoThrow |
Set | instanceFieldDefStmtList = new ArraySet() |
Set | staticFieldDefStmtList = null |
Map | stmtToDdOn |
Integer | indefiniteNode = null |
Map | stmtToCdOn |
Map | divergenceMap |
AnnotationManager | annotationManager = null |
Definition at line 54 of file BuildPDG.java.
|
Build dependency graph for one method in three steps:
Definition at line 148 of file BuildPDG.java. |
|
Insert the method's description here. Creation date: (00-11-1 16:22:46) This is for control analysis of init method. We assume that return statement of init method control dependent on init invoke of its super class. For example, public void init(int) { int b, size; Buffer JJJCTEMP$0; Object[] JJJCTEMP$1; JJJCTEMP$0 := @this; b :=
Definition at line 179 of file BuildPDG.java. Referenced by controlDependAnalysis().
|
|
Analyse control dependence for statements in
Given no any information on exception flow, all statements in Definition at line 218 of file BuildPDG.java. Referenced by controlDependAnalysis().
|
|
Clone and change base value for a set of instance field references.
Definition at line 266 of file BuildPDG.java. |
|
Collect all statements such that they assign values to instance field references, including all indirect assignments by method calls. Definition at line 280 of file BuildPDG.java. Referenced by prepareToBuild().
|
|
Collect all static field references ever defined in the method.
Definition at line 363 of file BuildPDG.java. Referenced by dataDependOfInstanceFieldRef(), and dataDependOfStaticFieldRef().
|
|
Compute immediate (post)dominator for each statement in the method.
Definition at line 385 of file BuildPDG.java. Referenced by immediateDominators().
|
|
Analyse control dependence for each statement in the method The algorithm of this method is from the compiler news group:
From href="http://compilers.iecc.com/comparch/article/92-12-065" target="_top"> comp.compilers</a>. 1. For a given flow node X, let P(X) denote the nodes that post-dominate X, along with X itself. Compute P(X) by using any of the standard techniques to solve the following backward data flow equations: P(X) = X | (P(Y1) & ... & P(Yn)), P(Stop) = {} where Y1 ... Yn are the successors of X, "|" denotes set union, "&" denotes set intersection, and Stop is a unique exit node for the flow graph. (This part is pretty much straight out of the red dragon book.) 2. Assume that each node in the flow graph has no more than 2 successors, and that if a node does have 2 successors, one is the "true" successor and the other the "false" successor. For a given flow node X, let CD(X) denote the nodes that are control dependent on X. If X has fewer than 2 successors, CD(X) is empty. Otherwise, we can find CD(X) as follows: CD(X) = P(X-true) ^ P(X-false) where X-true and X-false are respectively the true and false successors, and "^" denotes symmetric difference (i.e., A ^ B = (A | B) - (A & B)). Furthermore, the edges that should be labelled "true" in the control dependence graph are the ones from X to the nodes in CD(X) & P(X-true); and "false", the ones to the nodes in CD(X) & P(X-false). === End Algorithm ===
From href="http://compilers.iecc.com/comparch/article/92-12-068" target="_top"> comp.compilers</a>. CD(X) = (P(A) ^ (P(B) | P(C))) | (P(B) ^ (P(A) | P(C))) | (P(C) ^ (P(A) | P(B)))
From href="http://compilers.iecc.com/comparch/article/92-12-070" target="_top"> comp.compilers</a>.
From href="http://compilers.iecc.com/comparch/article/92-12-079" target="_top"> comp.compilers</a>. Definition at line 477 of file BuildPDG.java. Referenced by dependency().
|
|
Get control dependent predecessors, from stmtToCdOn, for the statement
Definition at line 529 of file BuildPDG.java. Referenced by SlicingMethod::slicingMethod(), and SlicingMethod::slicingMethodAgain().
|
|
Get control dependent successors for the statement
Definition at line 541 of file BuildPDG.java. |
|
See if there is a DataBox in
Definition at line 560 of file BuildPDG.java. Referenced by dataSuccNodesOf().
|
|
Analyse data dependence for each statement in the method. Analysis includes data data dependence of instance field references, data dependence of static or static based field references, and data dependence of parameters for method invokes.
Definition at line 580 of file BuildPDG.java. Referenced by dependency().
|
|
Get data dependences for one instance field reference
Definition at line 632 of file BuildPDG.java. Referenced by dataDependAnalysis(), ddForParameters(), and ddForStaticAndInstanceFd().
|
|
Get data dependences for one static field reference
Definition at line 688 of file BuildPDG.java. Referenced by ddForStaticAndInstanceFd().
|
|
Get data dependent predecessors, from stmtToDdOn for the statement
Definition at line 723 of file BuildPDG.java. Referenced by SlicingMethod::slicingMethod(), and SlicingMethod::slicingMethodAgain().
|
|
Get data dependent successors for the statement
Definition at line 734 of file BuildPDG.java. |
|
Insert the method's description here. Creation date: (7/10/2001 1:52:43 PM)
Definition at line 752 of file BuildPDG.java. Referenced by dataDependAnalysis().
|
|
Analyse data dependence for parameters (field references) of each call site in the method using REF/MOD information. Definition at line 798 of file BuildPDG.java. Referenced by dataDependAnalysis().
|
|
Analyse data dependence for static field, static based field and intance field references using REF/MOD information.
Definition at line 829 of file BuildPDG.java. Referenced by dataDependAnalysis().
|
|
Get the set of statements that define some mutual static field references with the statement
Definition at line 874 of file BuildPDG.java. Referenced by reachingDefOfStaticField().
|
|
Analyse control and data dependence for the method.
Definition at line 917 of file BuildPDG.java. Referenced by BuildPDG().
|
|
Insert the method's description here. Creation date: (4/20/2001 10:21:10 AM) Definition at line 934 of file BuildPDG.java. Referenced by dependency().
|
|
Calculate postdominators and immediate postdominators.
Definition at line 979 of file BuildPDG.java. Referenced by BuildPDG().
|
|
Insert the method's description here. Creation date: (6/15/2001 11:02:44 PM)
Definition at line 991 of file BuildPDG.java. Referenced by dataDependOfInstanceFieldRef().
|
|
Get the map of control dependency.
Definition at line 1004 of file BuildPDG.java. |
|
Insert the method's description here. Creation date: (4/20/2001 11:25:56 AM)
Definition at line 1014 of file BuildPDG.java. Referenced by divergenceDependenceAnalysis().
|
|
Get the map of data dependency.
Definition at line 1026 of file BuildPDG.java. |
|
Insert the method's description here. Creation date: (4/20/2001 10:27:38 AM)
Definition at line 1035 of file BuildPDG.java. |
|
Get all statements in handlers in the method.
Definition at line 1044 of file BuildPDG.java. Referenced by removeExceptionCaught().
|
|
Get the index of statement
Definition at line 1060 of file BuildPDG.java. Referenced by reachingDefOfInstanceField().
|
|
Definition at line 1082 of file BuildPDG.java. |
|
Get interferenceMap.
Definition at line 1091 of file BuildPDG.java. Referenced by SlicingMethod::slicingMethod(), and SlicingMethod::slicingMethodAgain().
|
|
Get lockAnalysis.
Definition at line 1100 of file BuildPDG.java. Referenced by InterClassAnalysis::lookupReadyDependStmt(), InterClassAnalysis::readyDependence(), SlicingMethod::slicingMethod(), and SlicingMethod::slicingMethodAgain().
|
|
Get readyDependMap.
Definition at line 1109 of file BuildPDG.java. Referenced by SlicingMethod::slicingMethod(), and SlicingMethod::slicingMethodAgain().
|
|
Insert the method's description here. Creation date: (7/11/2001 3:18:54 PM)
Definition at line 1120 of file BuildPDG.java. Referenced by dataDependOfInstanceFieldRef().
|
|
Find out the special invoke < init > statement corresponding to the
[1] p = new Power;
Suppose slice it from statement [3]. Then apparently [3] is data dependent on [1] by
Given a statement with
Definition at line 1223 of file BuildPDG.java. |
|
Find out the special invoke < init > statement corresponding to the
[1] p = new Power;
Suppose slice it from statement [3]. Then apparently [3] is data dependent on [1] by
Given a statement with
Definition at line 1164 of file BuildPDG.java. Referenced by specialInvokeDdAnalysis().
|
|
Get the index of statement
Definition at line 1257 of file BuildPDG.java. Referenced by reachingDefOfStaticField().
|
|
Compute immediate (post)dominators for stmtToPostdoms. Definition at line 1279 of file BuildPDG.java. Referenced by domination().
|
|
Get immediate postdominator for a statement
Definition at line 1303 of file BuildPDG.java. |
|
Get immediate postdominator for a statement represented by an index
Definition at line 1291 of file BuildPDG.java. Referenced by PostProcess::getNewJumpTarget().
|
|
Get a back point for the method if there is an indefinite loop in the method.
[1] label-a: stmt1; statement [n], assumming that statement [1] to [n] is an indefinite loop.
Definition at line 1325 of file BuildPDG.java. Referenced by initializeWorkList().
|
|
Initialize workList and stmtToPostdoms for postdomination analysis which is done by postDomAnalysis().
Definition at line 1357 of file BuildPDG.java. Referenced by postDomAnalysis().
|
|
Get the set of statements that define some mutual instance field references with the statement
Definition at line 1399 of file BuildPDG.java. Referenced by reachingDefOfInstanceField().
|
|
Insert the method's description here. Creation date: (7/10/2001 3:13:31 PM)
Definition at line 1440 of file BuildPDG.java. |
|
Insert the method's description here. Creation date: (7/10/2001 3:13:31 PM)
Definition at line 1422 of file BuildPDG.java. Referenced by ddForArray().
|
|
Analyse postdomination for the method.
Definition at line 1454 of file BuildPDG.java. Referenced by domination().
|
|
Calculate postdominators for each statement in the method starting from ininialized The alorithm is from the book "Advanced compiler design and implementation" by Steven S. Muchnick, 1997. Definition at line 1468 of file BuildPDG.java. Referenced by postDomAnalysis().
|
|
Get postdominators of a statement represented by the Integer index in stmtList using stmtToPostdoms.
Definition at line 1582 of file BuildPDG.java. |
|
Get postdominators of a statement using stmtToPostdoms.
Definition at line 1571 of file BuildPDG.java. |
|
Get postdominators of a statement represented by the
Definition at line 1560 of file BuildPDG.java. Referenced by controlDependAnalysis().
|
|
Insert the method's description here. Creation date: (4/20/2001 11:33:42 AM)
Definition at line 1593 of file BuildPDG.java. Referenced by SlicingMethod::slicingMethod(), and SlicingMethod::slicingMethodAgain().
|
|
Prepare to analyse data and control dependence.
Definition at line 1611 of file BuildPDG.java. Referenced by BuildPDG().
|
|
Implement reaching definition for instance field references. Definition at line 1638 of file BuildPDG.java. Referenced by dependency().
|
|
Implement reaching definition for static field references. Definition at line 1741 of file BuildPDG.java. Referenced by dependency().
|
|
Remove, from
Definition at line 1830 of file BuildPDG.java. Referenced by controlDependAnalysis(), and postdomFixPoint().
|
|
Set interferenceMap.
Definition at line 1845 of file BuildPDG.java. Referenced by InterClassAnalysis::interferenceDependence().
|
|
Set lockAnalysis.
Definition at line 1854 of file BuildPDG.java. Referenced by LockAnalysis::LockAnalysis().
|
|
Set readyDependMap.
Definition at line 1863 of file BuildPDG.java. Referenced by InterClassAnalysis::readyDependence().
|
|
Analyse data dependence for special invoke expressions.
[1] p = new Power;
Suppose slice it from statement [3]. Then apparently [3] is data dependent on [1] by
Given a statement with Definition at line 1891 of file BuildPDG.java. Referenced by dependency().
|
|
Insert the method's description here. Creation date: (4/20/2001 11:33:42 AM)
Definition at line 1941 of file BuildPDG.java. |
|
a map from CallSite to SootMethod where SootMethod is called in the CallSite. Definition at line 104 of file BuildPDG.java. |
|
The map of divergence dependence from pre-divergence point to reachable statement set (from that point): ( Definition at line 135 of file BuildPDG.java. |
|
a list of exit nodes (index) in the method which are stored as BitSet. Definition at line 58 of file BuildPDG.java. |
|
exit nodes without Definition at line 108 of file BuildPDG.java. |
|
a set of DataBox. Definition at line 112 of file BuildPDG.java. |
|
the result of reaching definition analysis for instance field references. Definition at line 83 of file BuildPDG.java. |
|
a map from Stmt to a List of InterferStmt for interference dependence of each statement in the method. Definition at line 99 of file BuildPDG.java. |
|
an instance of LockAnalysis. Definition at line 87 of file BuildPDG.java. |
|
a map from Stmt to a List of ReadyDependStmt for ready dependence of each statement in the method. Definition at line 93 of file BuildPDG.java. |
|
a set of DataBox. Definition at line 116 of file BuildPDG.java. |
|
the result of reaching definition analysis for static field references. Definition at line 79 of file BuildPDG.java. |
|
statement list of the method. Definition at line 73 of file BuildPDG.java. |
|
The map of control dependence: Stmt to BitSet. Definition at line 130 of file BuildPDG.java. |
|
The map of data dependence: Stmt to a Set of DataBox. Definition at line 122 of file BuildPDG.java. |
|
a map from Stmt to Integer for immediate postdominator of each statement in the method. Definition at line 69 of file BuildPDG.java. |
|
a map from Stmt to BitSet for postdominators of each statement in the method. Definition at line 64 of file BuildPDG.java. |