public class GeomPointsTo extends PAG
Modifier and Type | Field and Description |
---|---|
ZArrayNumberer<IVarAbstraction> |
allocations |
int[] |
block_num |
protected CgEdge[] |
call_graph |
java.util.Map<Node,IVarAbstraction> |
consG |
ZArrayNumberer<PlainConstraint> |
constraints |
long[] |
context_size |
java.lang.String |
dump_dir |
protected java.util.Map<Edge,CgEdge> |
edgeMapping |
protected java.util.Map<SootMethod,java.lang.Integer> |
func2int |
protected int[] |
indeg_cg |
protected java.util.Map<java.lang.Integer,SootMethod> |
int2func |
protected int[] |
low_cg |
long[] |
max_context_size_block |
int |
max_scc_id |
int |
max_scc_size |
java.util.Set<Stmt> |
multiCallsites |
int |
n_calls |
int |
n_func |
int |
n_init_constraints |
int |
n_reach_methods |
int |
n_reach_spark_user_methods |
int |
n_reach_user_methods |
protected IEncodingBroker |
nodeGenerator |
protected java.util.Vector<CgEdge> |
obsoletedEdges |
protected OfflineProcessor |
offlineProcessor |
ZArrayNumberer<IVarAbstraction> |
pointers |
protected int |
pre_cnt |
java.io.PrintStream |
ps |
protected java.util.Deque<java.lang.Integer> |
queue_cg |
protected int[] |
rep_cg |
protected java.util.Map<java.lang.Integer,java.util.LinkedList<CgEdge>> |
rev_call_graph |
protected int[] |
scc_size |
java.util.Set<Stmt> |
thread_run_callsites |
protected TypeManager |
typeManager |
protected java.util.Map<java.lang.String,java.lang.Boolean> |
validMethods |
protected int[] |
vis_cg |
protected IWorklist |
worklist |
accessibilityOracle, alloc, allocInv, assign2edges, assignInstance, assignInstanceInv, callAssigns, callToMethod, cgOpts, edgeQueue, EMPTY_NODE_ARRAY, load, loadInv, maxFinishNumber, nativeMethodDriver, newInstance, newInstanceInv, opts, setFactory, simple, simpleInv, somethingMerged, store, storeInv, virtualCallsToReceivers
ARRAY_ELEMENTS_NODE, CANONICAL_PATH, CANONICAL_PATH_LOCAL, CAST_NODE, DEFAULT_CLASS_LOADER, DEFAULT_CLASS_LOADER_LOCAL, EXCEPTION_NODE, FINALIZE_QUEUE, MAIN_CLASS_NAME_STRING, MAIN_CLASS_NAME_STRING_LOCAL, MAIN_THREAD_GROUP_NODE, MAIN_THREAD_GROUP_NODE_LOCAL, MAIN_THREAD_NODE, MAIN_THREAD_NODE_LOCAL, PHI_NODE, PRIVILEGED_ACTION_EXCEPTION, PRIVILEGED_ACTION_EXCEPTION_LOCAL, RETURN_NODE, RETURN_STRING_CONSTANT_NODE, STRING_ARRAY_NODE, STRING_ARRAY_NODE_LOCAL, STRING_NODE, STRING_NODE_LOCAL, THIS_NODE, THROW_NODE
Constructor and Description |
---|
GeomPointsTo(SparkOptions opts) |
Modifier and Type | Method and Description |
---|---|
boolean |
castNeverFails(Type src,
Type dst)
Type compatibility test.
|
void |
cleanResult()
We thoroughly delete the geometric points-to result for space saving.
|
java.io.FileOutputStream |
createOutputFile(java.lang.String file_name)
Create all output files under the uniform location.
|
void |
ddSolve(java.util.Set<Node> qryNodes)
The demand-driven mode for precisely computing points-to information for given pointers.
|
IVarAbstraction |
findAndInsertInstanceField(AllocNode obj,
SparkField field)
Obtain or create an internal representation of an object field.
|
IVarAbstraction |
findInstanceField(AllocNode obj,
SparkField field)
Obtain the internal representation of an object field.
|
IVarAbstraction |
findInternalNode(Node v)
Find our representation for the SPARK node @param v.
|
java.util.Set<SootMethod> |
getAllReachableMethods()
A replacement of the Scene.v().getReachableMethods.
|
java.util.LinkedList<CgEdge> |
getCallEdgesInto(int fid)
Get the call edges calling into the method @param fid.
|
CgEdge |
getCallEgesOutFrom(int fid)
Get the call edges calling from the method @param fid.
|
int |
getIDFromSootMethod(SootMethod sm)
Get Internal ID for soot method @param sm
|
CgEdge |
getInternalEdgeFromSootEdge(Edge e)
Obtain the edge representation internal to geomPTA.
|
int |
getMethodIDFromPtr(IVarAbstraction pn)
Get the index of the enclosing function of the specified node.
|
int |
getNumberOfMethods()
Return the number of functions that are reachable after the geometric points-to analysis.
|
int |
getNumberOfObjects()
Get the number of valid objects current in the container.
|
int |
getNumberOfPointers()
Get the number of valid pointers currently reachable by geomPTA.
|
int |
getNumberOfSparkMethods()
Return the number of functions that are reachable by SPARK.
|
SootMethod |
getSootMethodFromID(int fid)
Get soot method from given internal ID @param fid
|
IWorklist |
getWorklist() |
boolean |
hasGeomExecuted()
Is this a Spark or Geom?
|
boolean |
isExceptionPointer(Node v) |
boolean |
isReachableMethod(int fid)
Deciding if the given method represented by @param fid is reachable.
|
boolean |
isReachableMethod(SootMethod sm)
Deciding if the given method represented by @param sm is reachable.
|
boolean |
isValidGeometricNode(Node sparkNode)
Given a valid SPARK node, we test if it is still valid after the geometric analysis.
|
boolean |
isValidMethod(SootMethod sm)
Telling if the given method is in the file given by the option "cg.spark geom-verify-name".
|
void |
keepOnly(java.util.Set<IVarAbstraction> usefulPointers)
Keep only the pointers the users are interested in.
|
IVarAbstraction |
makeInternalNode(Node v)
Transform the SPARK node @param v representation to our representation.
|
void |
outputNotEvaluatedMethods() |
void |
parametrize(double spark_run_time)
Using the user specified arguments to parameterize the geometric points-to solver.
|
PointsToSet |
reachingObjects(AllocNode an,
SootField f) |
PointsToSet |
reachingObjects(Context c,
Local l)
Returns the set of objects pointed to by variable l in context c.
|
PointsToSet |
reachingObjects(Context c,
Local l,
SootField f)
Returns the set of objects pointed to by instance field f of the objects
pointed to by l in context c.
|
PointsToSet |
reachingObjects(Local l)
Returns the set of objects pointed to by variable l.
|
PointsToSet |
reachingObjects(Local l,
SootField f)
Returns the set of objects pointed to by instance field f of the objects
pointed to by l.
|
PointsToSet |
reachingObjects(PointsToSet s,
SootField f)
Returns the set of objects pointed to by instance field f of the objects in
the PointsToSet s.
|
PointsToSet |
reachingObjects(SootField f)
Returns the set of objects pointed to by static field f.
|
PointsToSet |
reachingObjectsOfArrayElement(PointsToSet s)
Returns the set of objects pointed to by elements of the arrays in the
PointsToSet s.
|
void |
solve()
The starting point of the geometric points-to analysis engine.
|
java.lang.String |
toString() |
void |
transformToCIResult()
For many applications, they only need the context insensitive points-to result.
|
addAllocEdge, addAssignInstanceEdge, addCallTarget, addCallTarget, addDereference, addEdge, addInterproceduralAssignment, addLoadEdge, addNewInstanceEdge, addSimpleEdge, addStoreEdge, addToMap, allocInvLookup, allocInvSources, allocInvSourcesIterator, allocLookup, allocNodeListener, allocSources, allocSourcesIterator, assignInstanceLookup, assignInstanceSources, cleanPAG, cleanUpMerges, doAddAllocEdge, doAddAssignInstanceEdge, doAddLoadEdge, doAddNewInstanceEdge, doAddSimpleEdge, doAddStoreEdge, edgeReader, findAllocDotField, findContextVarNode, findGlobalFieldRefNode, findGlobalVarNode, findLocalFieldRefNode, findLocalVarNode, getAllocDotFieldNodeNumberer, getAllocNodeNumberer, getCGOpts, getDereferences, getFieldRefNodeNumberer, getNodeTags, getNumAllocNodes, getOnFlyCallGraph, getOpts, getSetFactory, getTypeManager, getVarNodeNumberer, loadInvLookup, loadInvSources, loadInvSourcesIterator, loadLookup, loadSources, loadSourcesIterator, lookup, lookupEdgesForAssignment, makeAllocDotField, makeAllocNode, makeClassConstantNode, makeContextVarNode, makeContextVarNode, makeFieldRefNode, makeGlobalFieldRefNode, makeGlobalVarNode, makeLocalFieldRefNode, makeLocalVarNode, makeNewInstanceNode, makeStringConstantNode, newInstanceLookup, newInstanceSources, nodeFactory, ofcg, setOnFlyCallGraph, simpleInvLookup, simpleInvSources, simpleInvSourcesIterator, simpleLookup, simpleSources, simpleSourcesIterator, storeInvLookup, storeInvSources, storeInvSourcesIterator, storeLookup, storeSources, storeSourcesIterator
protected IWorklist worklist
protected IEncodingBroker nodeGenerator
protected TypeManager typeManager
protected OfflineProcessor offlineProcessor
public java.util.Map<Node,IVarAbstraction> consG
public ZArrayNumberer<IVarAbstraction> pointers
public ZArrayNumberer<IVarAbstraction> allocations
public ZArrayNumberer<PlainConstraint> constraints
public java.util.Set<Stmt> thread_run_callsites
public java.util.Set<Stmt> multiCallsites
public long[] context_size
public long[] max_context_size_block
public int[] block_num
public int max_scc_size
public int max_scc_id
public int n_func
public int n_calls
public int n_reach_methods
public int n_reach_user_methods
public int n_reach_spark_user_methods
public int n_init_constraints
public java.lang.String dump_dir
public java.io.PrintStream ps
protected java.util.Map<java.lang.String,java.lang.Boolean> validMethods
protected CgEdge[] call_graph
protected java.util.Vector<CgEdge> obsoletedEdges
protected java.util.Map<java.lang.Integer,java.util.LinkedList<CgEdge>> rev_call_graph
protected java.util.Deque<java.lang.Integer> queue_cg
protected int[] vis_cg
protected int[] low_cg
protected int[] rep_cg
protected int[] indeg_cg
protected int[] scc_size
protected int pre_cnt
protected java.util.Map<SootMethod,java.lang.Integer> func2int
protected java.util.Map<java.lang.Integer,SootMethod> int2func
public java.lang.String toString()
toString
in class java.lang.Object
public void parametrize(double spark_run_time)
spark_run_time
- public void transformToCIResult()
public void solve()
public void ddSolve(java.util.Set<Node> qryNodes)
qryNodes:
- the set of nodes that would be refined by geomPA.public void cleanResult()
public void keepOnly(java.util.Set<IVarAbstraction> usefulPointers)
public int getIDFromSootMethod(SootMethod sm)
public SootMethod getSootMethodFromID(int fid)
public boolean isReachableMethod(int fid)
public boolean isReachableMethod(SootMethod sm)
public boolean isValidMethod(SootMethod sm)
public void outputNotEvaluatedMethods()
public java.util.Set<SootMethod> getAllReachableMethods()
public CgEdge getCallEgesOutFrom(int fid)
public java.util.LinkedList<CgEdge> getCallEdgesInto(int fid)
public int getMethodIDFromPtr(IVarAbstraction pn)
public IVarAbstraction makeInternalNode(Node v)
public IVarAbstraction findInternalNode(Node v)
public boolean castNeverFails(Type src, Type dst)
src
- dst
- public int getNumberOfPointers()
public int getNumberOfObjects()
public int getNumberOfSparkMethods()
public int getNumberOfMethods()
public IWorklist getWorklist()
public IVarAbstraction findInstanceField(AllocNode obj, SparkField field)
public IVarAbstraction findAndInsertInstanceField(AllocNode obj, SparkField field)
public CgEdge getInternalEdgeFromSootEdge(Edge e)
public boolean isExceptionPointer(Node v)
public boolean isValidGeometricNode(Node sparkNode)
public boolean hasGeomExecuted()
public java.io.FileOutputStream createOutputFile(java.lang.String file_name) throws java.io.FileNotFoundException
file_name
- java.io.FileNotFoundException
public PointsToSet reachingObjects(Local l)
PAG
reachingObjects
in interface PointsToAnalysis
reachingObjects
in class PAG
public PointsToSet reachingObjects(Context c, Local l)
PAG
reachingObjects
in interface PointsToAnalysis
reachingObjects
in class PAG
public PointsToSet reachingObjects(SootField f)
PAG
reachingObjects
in interface PointsToAnalysis
reachingObjects
in class PAG
public PointsToSet reachingObjects(PointsToSet s, SootField f)
PAG
reachingObjects
in interface PointsToAnalysis
reachingObjects
in class PAG
public PointsToSet reachingObjects(Local l, SootField f)
PAG
reachingObjects
in interface PointsToAnalysis
reachingObjects
in class PAG
public PointsToSet reachingObjects(Context c, Local l, SootField f)
PAG
reachingObjects
in interface PointsToAnalysis
reachingObjects
in class PAG
public PointsToSet reachingObjectsOfArrayElement(PointsToSet s)
PAG
reachingObjectsOfArrayElement
in interface PointsToAnalysis
reachingObjectsOfArrayElement
in class PAG
public PointsToSet reachingObjects(AllocNode an, SootField f)