public class CastCheckEliminator extends ForwardBranchedFlowAnalysis<soot.jimple.toolkits.pointer.LocalTypeSet>
unitToAfterBranchFlow, unitToAfterFallFlow
filterUnitToBeforeFlow, graph, unitToBeforeFlow
Constructor and Description |
---|
CastCheckEliminator(BriefUnitGraph cfg) |
Modifier and Type | Method and Description |
---|---|
protected void |
copy(soot.jimple.toolkits.pointer.LocalTypeSet s,
soot.jimple.toolkits.pointer.LocalTypeSet d)
Creates a copy of the
source flow object in dest . |
protected soot.jimple.toolkits.pointer.LocalTypeSet |
entryInitialFlow()
Returns a new, aggressive (local,type) set.
|
protected void |
flowThrough(soot.jimple.toolkits.pointer.LocalTypeSet in,
Unit unit,
java.util.List<soot.jimple.toolkits.pointer.LocalTypeSet> outFallValues,
java.util.List<soot.jimple.toolkits.pointer.LocalTypeSet> outBranchValues)
This is the flow function as described in the assignment write-up.
|
protected void |
makeInitialSet()
Find all the locals of reference type and all the types used in casts
to initialize the mapping from locals and types to bits in the bit vector
in LocalTypeSet.
|
protected void |
merge(soot.jimple.toolkits.pointer.LocalTypeSet in1,
soot.jimple.toolkits.pointer.LocalTypeSet in2,
soot.jimple.toolkits.pointer.LocalTypeSet o)
Compute the merge of the
in1 and in2 sets, putting the result into out . |
protected soot.jimple.toolkits.pointer.LocalTypeSet |
newInitialFlow()
Returns a new, aggressive (local,type) set.
|
protected void |
tagCasts()
Put the results of the analysis into tags in cast statements.
|
doAnalysis, isForward
getBranchFlowAfter, getFallFlowAfter
getFlowBefore, merge, mergeInto, treatTrapHandlersAsEntries
public CastCheckEliminator(BriefUnitGraph cfg)
protected void tagCasts()
protected void makeInitialSet()
protected soot.jimple.toolkits.pointer.LocalTypeSet newInitialFlow()
newInitialFlow
in class AbstractFlowAnalysis<Unit,soot.jimple.toolkits.pointer.LocalTypeSet>
protected void flowThrough(soot.jimple.toolkits.pointer.LocalTypeSet in, Unit unit, java.util.List<soot.jimple.toolkits.pointer.LocalTypeSet> outFallValues, java.util.List<soot.jimple.toolkits.pointer.LocalTypeSet> outBranchValues)
flowThrough
in class BranchedFlowAnalysis<Unit,soot.jimple.toolkits.pointer.LocalTypeSet>
protected void copy(soot.jimple.toolkits.pointer.LocalTypeSet s, soot.jimple.toolkits.pointer.LocalTypeSet d)
AbstractFlowAnalysis
source
flow object in dest
.copy
in class AbstractFlowAnalysis<Unit,soot.jimple.toolkits.pointer.LocalTypeSet>
protected void merge(soot.jimple.toolkits.pointer.LocalTypeSet in1, soot.jimple.toolkits.pointer.LocalTypeSet in2, soot.jimple.toolkits.pointer.LocalTypeSet o)
AbstractFlowAnalysis
in1
and in2
sets, putting the result into out
.
The behavior of this function depends on the implementation ( it may be necessary to check whether
in1
and in2
are equal or aliased ).
Used by the doAnalysis method.merge
in class AbstractFlowAnalysis<Unit,soot.jimple.toolkits.pointer.LocalTypeSet>
protected soot.jimple.toolkits.pointer.LocalTypeSet entryInitialFlow()
entryInitialFlow
in class AbstractFlowAnalysis<Unit,soot.jimple.toolkits.pointer.LocalTypeSet>