Package soot.jimple.spark.geom.geomPA
Class GeomQueries
- java.lang.Object
-
- soot.jimple.spark.geom.geomPA.GeomQueries
-
public class GeomQueries extends Object
A powerful interface for querying points-to results in many ways. It is an extension for SPARK standard querying system.- Author:
- xiao
-
-
Field Summary
Fields Modifier and Type Field Description protected int[]block_numprotected CgEdge[]call_graphprotected GeomPointsTogeomPTAprotected long[]max_context_size_blockprotected intn_funcprotected int[]rep_cgprotected int[]scc_sizeprotected int[]top_rankprotected int[]vis_cg
-
Constructor Summary
Constructors Constructor Description GeomQueries(GeomPointsTo geom_pta)We copy and make a condensed version of call graph.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancontexsByAnyCallEdge(Edge sootEdge, Local l, PtSensVisitor visitor)Deprecated.booleancontextsByAnyCallEdge(Edge sootEdge, Local l, SparkField field, PtSensVisitor visitor)Deprecated.booleancontextsByCallChain(Edge[] callEdgeChain, Local l, PtSensVisitor visitor)Deprecated.booleancontextsByCallChain(Edge[] callEdgeChain, Local l, SparkField field, PtSensVisitor visitor)Deprecated.booleancontextsGoBy(Edge sootEdge, Local l, PtSensVisitor visitor)Answer contexts-go-by query.booleancontextsGoBy(Edge sootEdge, Local l, SparkField field, PtSensVisitor visitor)Searching the points-to results for field expression such as p.f.protected booleandfsScanSubgraph(int s, int target)Retrieve the subgraph from s->target.booleanisAlias(IVarAbstraction pn1, IVarAbstraction pn2)Test if two pointers given in geomPTA form are an alias under any contexts.booleanisAlias(Local l1, Local l2)Decide if under any contexts, pointers @param l1 and @param l2 can be an alias.booleanisAliasCI(Local l1, Local l2)Are the two pointers an alias with context insensitive points-to information?booleankCFA(Edge[] callEdgeChain, Local l, PtSensVisitor visitor)Standard K-CFA querying for arbitrary K.booleankCFA(Edge[] callEdgeChain, Local l, SparkField field, PtSensVisitor visitor)Standard K-CFA querying for field expression.protected booleanpropagateIntervals(int start, long L, long R, int target)Compute the mapping from interval [L, R) of method start to the intervals of method target.protected voidtransferInSCC(int s, int t, long L, long R, ContextsCollector tContexts)
-
-
-
Field Detail
-
geomPTA
protected GeomPointsTo geomPTA
-
n_func
protected int n_func
-
call_graph
protected CgEdge[] call_graph
-
vis_cg
protected int[] vis_cg
-
rep_cg
protected int[] rep_cg
-
scc_size
protected int[] scc_size
-
block_num
protected int[] block_num
-
max_context_size_block
protected long[] max_context_size_block
-
top_rank
protected int[] top_rank
-
-
Constructor Detail
-
GeomQueries
public GeomQueries(GeomPointsTo geom_pta)
We copy and make a condensed version of call graph.- Parameters:
geom_pts-
-
-
Method Detail
-
dfsScanSubgraph
protected boolean dfsScanSubgraph(int s, int target)Retrieve the subgraph from s->target. An edge s->t is included in the subgraph iff target is reachable from t.- Parameters:
s-target-- Returns:
-
transferInSCC
protected void transferInSCC(int s, int t, long L, long R, ContextsCollector tContexts)
-
propagateIntervals
protected boolean propagateIntervals(int start, long L, long R, int target)Compute the mapping from interval [L, R) of method start to the intervals of method target. Return true if the mapping is feasible.- Parameters:
start-L-R-target-- Returns:
-
contextsGoBy
public boolean contextsGoBy(Edge sootEdge, Local l, PtSensVisitor visitor)
Answer contexts-go-by query. Usually, users specify the last K paths as the context. We call it k-CFA context. However, k-CFA is too restrictive. In contexts-go-by query, user specifies arbitrary call edge in the call graph. The query searches for all contexts induced by the specified call edge and collect points-to results under these contexts.- Parameters:
sootEdge- : the specified context edge in soot edge formatl- : the querying pointervisitor- : container for querying result- Returns:
- false, l does not have points-to information under the contexts induced by the given call edge
-
contexsByAnyCallEdge
@Deprecated public boolean contexsByAnyCallEdge(Edge sootEdge, Local l, PtSensVisitor visitor)
Deprecated.
-
contextsGoBy
public boolean contextsGoBy(Edge sootEdge, Local l, SparkField field, PtSensVisitor visitor)
Searching the points-to results for field expression such as p.f.- Parameters:
sootEdge-l-field-visitor-- Returns:
-
contextsByAnyCallEdge
@Deprecated public boolean contextsByAnyCallEdge(Edge sootEdge, Local l, SparkField field, PtSensVisitor visitor)
Deprecated.
-
kCFA
public boolean kCFA(Edge[] callEdgeChain, Local l, PtSensVisitor visitor)
Standard K-CFA querying for arbitrary K.- Parameters:
callEdgeChain- : last K call edges leading to the method that contains l. callEdgeChain[0] is the farthest call edge in the chain.l- : the querying pointervisitor- : the querying result container- Returns:
- false, l does not have points-to information under the given context
-
contextsByCallChain
@Deprecated public boolean contextsByCallChain(Edge[] callEdgeChain, Local l, PtSensVisitor visitor)
Deprecated.
-
kCFA
public boolean kCFA(Edge[] callEdgeChain, Local l, SparkField field, PtSensVisitor visitor)
Standard K-CFA querying for field expression.- Parameters:
callEdgeChain- : callEdgeChain[0] is the farthest call edge in the chain.l-field-visitor-- Returns:
-
contextsByCallChain
@Deprecated public boolean contextsByCallChain(Edge[] callEdgeChain, Local l, SparkField field, PtSensVisitor visitor)
Deprecated.
-
isAliasCI
public boolean isAliasCI(Local l1, Local l2)
Are the two pointers an alias with context insensitive points-to information?
-
isAlias
public boolean isAlias(IVarAbstraction pn1, IVarAbstraction pn2)
Test if two pointers given in geomPTA form are an alias under any contexts.- Parameters:
pn1- and @param pn2 cannot be null.
-
-