|
||||||||||
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,SignAnalysis.Sign>> vasco.soot.examples.SignAnalysis
public class SignAnalysis
An inter-procedural simplified sign analysis.
This analysis maps numeric variables to a sign (negative, positive or zero), if it
is statically determined to be singular, or else bottom
(represented by null
.
Flow functions are non-distributive for statements involving sums or products of two variables.
Nested Class Summary | |
---|---|
static class |
SignAnalysis.Sign
|
Field Summary |
---|
Fields inherited from class vasco.InterProceduralAnalysis |
---|
contexts, contextTransitions, freeResultsOnTheFly, reverse, verbose, worklist |
Method Summary | |
---|---|
Map<Local,SignAnalysis.Sign> |
boundaryValue(SootMethod method)
Returns the initial data flow value at the program entry points. |
Map<Local,SignAnalysis.Sign> |
callEntryFlowFunction(Context<SootMethod,Unit,Map<Local,SignAnalysis.Sign>> context,
SootMethod calledMethod,
Unit unit,
Map<Local,SignAnalysis.Sign> inValue)
Processes the inter-procedural flow function for a method call at the start of the call, to handle parameters. |
Map<Local,SignAnalysis.Sign> |
callExitFlowFunction(Context<SootMethod,Unit,Map<Local,SignAnalysis.Sign>> context,
SootMethod calledMethod,
Unit unit,
Map<Local,SignAnalysis.Sign> exitValue)
Processes the inter-procedural flow function for a method call at the end of the call, to handle return values. |
Map<Local,SignAnalysis.Sign> |
callLocalFlowFunction(Context<SootMethod,Unit,Map<Local,SignAnalysis.Sign>> context,
Unit unit,
Map<Local,SignAnalysis.Sign> 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,SignAnalysis.Sign> |
copy(Map<Local,SignAnalysis.Sign> src)
Returns a copy of the given data flow value. |
Map<Local,SignAnalysis.Sign> |
meet(Map<Local,SignAnalysis.Sign> op1,
Map<Local,SignAnalysis.Sign> op2)
Returns the meet of two data flow values. |
Map<Local,SignAnalysis.Sign> |
normalFlowFunction(Context<SootMethod,Unit,Map<Local,SignAnalysis.Sign>> context,
Unit unit,
Map<Local,SignAnalysis.Sign> 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,SignAnalysis.Sign> |
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,SignAnalysis.Sign> normalFlowFunction(Context<SootMethod,Unit,Map<Local,SignAnalysis.Sign>> context, Unit unit, Map<Local,SignAnalysis.Sign> inValue)
ForwardInterProceduralAnalysis
normalFlowFunction
in class ForwardInterProceduralAnalysis<SootMethod,Unit,Map<Local,SignAnalysis.Sign>>
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,SignAnalysis.Sign> callEntryFlowFunction(Context<SootMethod,Unit,Map<Local,SignAnalysis.Sign>> context, SootMethod calledMethod, Unit unit, Map<Local,SignAnalysis.Sign> inValue)
ForwardInterProceduralAnalysis
callEntryFlowFunction
in class ForwardInterProceduralAnalysis<SootMethod,Unit,Map<Local,SignAnalysis.Sign>>
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,SignAnalysis.Sign> callExitFlowFunction(Context<SootMethod,Unit,Map<Local,SignAnalysis.Sign>> context, SootMethod calledMethod, Unit unit, Map<Local,SignAnalysis.Sign> exitValue)
ForwardInterProceduralAnalysis
callExitFlowFunction
in class ForwardInterProceduralAnalysis<SootMethod,Unit,Map<Local,SignAnalysis.Sign>>
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,SignAnalysis.Sign> callLocalFlowFunction(Context<SootMethod,Unit,Map<Local,SignAnalysis.Sign>> context, Unit unit, Map<Local,SignAnalysis.Sign> inValue)
ForwardInterProceduralAnalysis
callLocalFlowFunction
in class ForwardInterProceduralAnalysis<SootMethod,Unit,Map<Local,SignAnalysis.Sign>>
context
- the value context at the call-siteunit
- the statement containing the method callinValue
- the data flow value before the call
public Map<Local,SignAnalysis.Sign> 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,SignAnalysis.Sign>>
method
- an entry point specified by the program representation
ProgramRepresentation.getEntryPoints()
public Map<Local,SignAnalysis.Sign> copy(Map<Local,SignAnalysis.Sign> src)
InterProceduralAnalysis
copy
in class InterProceduralAnalysis<SootMethod,Unit,Map<Local,SignAnalysis.Sign>>
src
- the data flow value to copy
public Map<Local,SignAnalysis.Sign> meet(Map<Local,SignAnalysis.Sign> op1, Map<Local,SignAnalysis.Sign> op2)
InterProceduralAnalysis
meet
in class InterProceduralAnalysis<SootMethod,Unit,Map<Local,SignAnalysis.Sign>>
op1
- the first operandop2
- the second operand
public Map<Local,SignAnalysis.Sign> topValue()
topValue
in class InterProceduralAnalysis<SootMethod,Unit,Map<Local,SignAnalysis.Sign>>
public ProgramRepresentation<SootMethod,Unit> programRepresentation()
programRepresentation
in class InterProceduralAnalysis<SootMethod,Unit,Map<Local,SignAnalysis.Sign>>
DefaultJimpleRepresentation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |