|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vasco.InterProceduralAnalysis<M,N,A> vasco.ForwardInterProceduralAnalysis<SootMethod,Unit,Map<Local,Constant>> vasco.soot.examples.CopyConstantAnalysis
public class CopyConstantAnalysis
An inter-procedural copy constant propagation analysis.
This analysis uses a mapping of Local
s to Constant
s as
data flow values. The flow functions consider assignments of constants
to locals (immediate operands) as well as assignments of locals to locals
where the operand has a constant value. This type of analysis is commonly referred
to as copy constant propagation.
Field Summary |
---|
Fields inherited from class vasco.InterProceduralAnalysis |
---|
contexts, contextTransitions, freeResultsOnTheFly, reverse, verbose, worklist |
Method Summary | |
---|---|
Map<Local,Constant> |
boundaryValue(SootMethod method)
Returns the initial data flow value at the program entry points. |
Map<Local,Constant> |
callEntryFlowFunction(Context<SootMethod,Unit,Map<Local,Constant>> context,
SootMethod calledMethod,
Unit unit,
Map<Local,Constant> inValue)
Processes the inter-procedural flow function for a method call at the start of the call, to handle parameters. |
Map<Local,Constant> |
callExitFlowFunction(Context<SootMethod,Unit,Map<Local,Constant>> context,
SootMethod calledMethod,
Unit unit,
Map<Local,Constant> exitValue)
Processes the inter-procedural flow function for a method call at the end of the call, to handle return values. |
Map<Local,Constant> |
callLocalFlowFunction(Context<SootMethod,Unit,Map<Local,Constant>> context,
Unit unit,
Map<Local,Constant> inValue)
Processes the intra-procedural flow function for a method call at the call-site itself, to handle propagation of local values that are not involved in the call. |
Map<Local,Constant> |
copy(Map<Local,Constant> src)
Returns a copy of the given data flow value. |
Map<Local,Constant> |
meet(Map<Local,Constant> op1,
Map<Local,Constant> op2)
Returns the meet of two data flow values. |
Map<Local,Constant> |
normalFlowFunction(Context<SootMethod,Unit,Map<Local,Constant>> context,
Unit unit,
Map<Local,Constant> inValue)
Processes the intra-procedural flow function of a statement that does not contain a method call. |
ProgramRepresentation<SootMethod,Unit> |
programRepresentation()
Returns a default jimple representation. |
Map<Local,Constant> |
topValue()
Returns an empty map. |
Methods inherited from class vasco.ForwardInterProceduralAnalysis |
---|
doAnalysis, initContext |
Methods inherited from class vasco.InterProceduralAnalysis |
---|
getCallers, getContext, getContexts, getContextTransitionTable, getMeetOverValidPathsSolution, getMethods, getTargets |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Map<Local,Constant> normalFlowFunction(Context<SootMethod,Unit,Map<Local,Constant>> context, Unit unit, Map<Local,Constant> inValue)
ForwardInterProceduralAnalysis
normalFlowFunction
in class ForwardInterProceduralAnalysis<SootMethod,Unit,Map<Local,Constant>>
context
- the value context at the call-siteunit
- the statement whose flow function to processinValue
- the data flow value before the statement
public Map<Local,Constant> callEntryFlowFunction(Context<SootMethod,Unit,Map<Local,Constant>> context, SootMethod calledMethod, Unit unit, Map<Local,Constant> inValue)
ForwardInterProceduralAnalysis
callEntryFlowFunction
in class ForwardInterProceduralAnalysis<SootMethod,Unit,Map<Local,Constant>>
context
- the value context at the call-sitecalledMethod
- the target (or one of the targets) of this call siteunit
- the statement containing the method callinValue
- the data flow value before the call
public Map<Local,Constant> callExitFlowFunction(Context<SootMethod,Unit,Map<Local,Constant>> context, SootMethod calledMethod, Unit unit, Map<Local,Constant> exitValue)
ForwardInterProceduralAnalysis
callExitFlowFunction
in class ForwardInterProceduralAnalysis<SootMethod,Unit,Map<Local,Constant>>
context
- the value context at the call-sitecalledMethod
- the target (or one of the targets) of this call siteunit
- the statement containing the method callexitValue
- the data flow value at the exit of the called procedure
public Map<Local,Constant> callLocalFlowFunction(Context<SootMethod,Unit,Map<Local,Constant>> context, Unit unit, Map<Local,Constant> inValue)
ForwardInterProceduralAnalysis
callLocalFlowFunction
in class ForwardInterProceduralAnalysis<SootMethod,Unit,Map<Local,Constant>>
context
- the value context at the call-siteunit
- the statement containing the method callinValue
- the data flow value before the call
public Map<Local,Constant> boundaryValue(SootMethod method)
InterProceduralAnalysis
Note that this method will be called exactly once per entry point specified by the program representation.
boundaryValue
in class InterProceduralAnalysis<SootMethod,Unit,Map<Local,Constant>>
method
- an entry point specified by the program representation
ProgramRepresentation.getEntryPoints()
public Map<Local,Constant> copy(Map<Local,Constant> src)
InterProceduralAnalysis
copy
in class InterProceduralAnalysis<SootMethod,Unit,Map<Local,Constant>>
src
- the data flow value to copy
public Map<Local,Constant> meet(Map<Local,Constant> op1, Map<Local,Constant> op2)
InterProceduralAnalysis
meet
in class InterProceduralAnalysis<SootMethod,Unit,Map<Local,Constant>>
op1
- the first operandop2
- the second operand
public Map<Local,Constant> topValue()
topValue
in class InterProceduralAnalysis<SootMethod,Unit,Map<Local,Constant>>
public ProgramRepresentation<SootMethod,Unit> programRepresentation()
programRepresentation
in class InterProceduralAnalysis<SootMethod,Unit,Map<Local,Constant>>
DefaultJimpleRepresentation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |