public class LocalMustNotAliasAnalysis extends ForwardFlowAnalysis<Unit,HashMap<Local,Set<NewExpr>>>
FlowAnalysis.Flow| Modifier and Type | Field and Description |
|---|---|
protected Set<Local> |
locals |
protected static NewExpr |
UNKNOWN |
filterUnitToAfterFlow, unitToAfterFlowfilterUnitToBeforeFlow, graph, unitToBeforeFlow| Constructor and Description |
|---|
LocalMustNotAliasAnalysis(DirectedGraph<Unit> directedGraph,
Body b) |
LocalMustNotAliasAnalysis(UnitGraph g) |
| Modifier and Type | Method and Description |
|---|---|
RefType |
concreteType(Local l,
Stmt s)
If the given local at the given statement was initialized with a single, concrete new-expression then the type of this
expression is returned.
|
protected void |
copy(HashMap<Local,Set<NewExpr>> source,
HashMap<Local,Set<NewExpr>> dest)
Creates a copy of the
source flow object in dest. |
protected HashMap<Local,Set<NewExpr>> |
entryInitialFlow()
Returns the initial flow value for entry/exit graph nodes.
|
protected void |
flowThrough(HashMap<Local,Set<NewExpr>> in,
Unit unit,
HashMap<Local,Set<NewExpr>> out)
Given the merge of the
out sets, compute the in set for s (or in to out,
depending on direction). |
boolean |
hasInfoOn(Local l,
Stmt s)
Returns true if this analysis has any information about local l at statement s (i.e.
|
protected void |
merge(HashMap<Local,Set<NewExpr>> in1,
HashMap<Local,Set<NewExpr>> in2,
HashMap<Local,Set<NewExpr>> o)
Compute the merge of the
in1 and in2 sets, putting the result into out. |
protected HashMap<Local,Set<NewExpr>> |
newInitialFlow()
Returns the flow object corresponding to the initial values for each graph node.
|
boolean |
notMayAlias(Local l1,
Stmt s1,
Local l2,
Stmt s2) |
doAnalysis, isForwardgetFlow, getFlowAfter, getFlowBefore, omissiblemerge, mergeInto, treatTrapHandlersAsEntriespublic LocalMustNotAliasAnalysis(UnitGraph g)
public LocalMustNotAliasAnalysis(DirectedGraph<Unit> directedGraph, Body b)
protected void merge(HashMap<Local,Set<NewExpr>> in1, HashMap<Local,Set<NewExpr>> in2, HashMap<Local,Set<NewExpr>> o)
AbstractFlowAnalysisin1 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.protected void flowThrough(HashMap<Local,Set<NewExpr>> in, Unit unit, HashMap<Local,Set<NewExpr>> out)
FlowAnalysisout sets, compute the in set for s (or in to out,
depending on direction).
This function often causes confusion, because the same interface is used for both forward and backward flow analyses.
The first parameter is always the argument to the flow function (i.e. it is the "in" set in a forward analysis and the
"out" set in a backward analysis), and the third parameter is always the result of the flow function (i.e. it is the
"out" set in a forward analysis and the "in" set in a backward analysis).flowThrough in class FlowAnalysis<Unit,HashMap<Local,Set<NewExpr>>>in - the input flowunit - the current nodeout - the returned flowprotected void copy(HashMap<Local,Set<NewExpr>> source, HashMap<Local,Set<NewExpr>> dest)
AbstractFlowAnalysissource flow object in dest.protected HashMap<Local,Set<NewExpr>> entryInitialFlow()
AbstractFlowAnalysisAbstractFlowAnalysis.newInitialFlow()entryInitialFlow in class AbstractFlowAnalysis<Unit,HashMap<Local,Set<NewExpr>>>protected HashMap<Local,Set<NewExpr>> newInitialFlow()
AbstractFlowAnalysisnewInitialFlow in class AbstractFlowAnalysis<Unit,HashMap<Local,Set<NewExpr>>>public boolean hasInfoOn(Local l, Stmt s)
UNKNOWN). In
particular, it is safe to pass in locals/statements that are not even part of the right method. In those cases
false will be returned. Permits s to be null, in which case false will be
returned.public boolean notMayAlias(Local l1, Stmt s1, Local l2, Stmt s2)
Copyright © 2020 Soot OSS. All rights reserved.