|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object soot.jimple.spark.pag.PAG
public class PAG
Pointer assignment graph.
Field Summary | |
---|---|
protected Map<Object,Object> |
alloc
|
protected Map<Object,Object> |
allocInv
|
protected Map<Pair,Set<Edge>> |
assign2edges
|
HashMultiMap |
callAssigns
|
Map<InvokeExpr,SootMethod> |
callToMethod
|
protected ChunkedQueue |
edgeQueue
|
protected static Node[] |
EMPTY_NODE_ARRAY
|
protected Map<Object,Object> |
load
|
protected Map<Object,Object> |
loadInv
|
int |
maxFinishNumber
|
NativeMethodDriver |
nativeMethodDriver
|
protected SparkOptions |
opts
|
protected P2SetFactory |
setFactory
|
protected Map<Object,Object> |
simple
|
protected Map<Object,Object> |
simpleInv
|
protected boolean |
somethingMerged
|
protected Map<Object,Object> |
store
|
protected Map<Object,Object> |
storeInv
|
protected TypeManager |
typeManager
|
Map<InvokeExpr,Node> |
virtualCallsToReceivers
|
Constructor Summary | |
---|---|
PAG(SparkOptions opts)
|
Method Summary | |
---|---|
boolean |
addAllocEdge(AllocNode from,
VarNode to)
|
void |
addCallTarget(Edge e)
|
void |
addCallTarget(MethodPAG srcmpag,
MethodPAG tgtmpag,
Stmt s,
Context srcContext,
Context tgtContext,
Edge e)
Adds method target as a possible target of the invoke expression in s. |
void |
addDereference(VarNode base)
Adds the base of a dereference to the list of dereferenced variables. |
boolean |
addEdge(Node from,
Node to)
Adds an edge to the graph, returning false if it was already there. |
Pair<Node,Node> |
addInterproceduralAssignment(Node from,
Node to,
Edge e)
|
boolean |
addLoadEdge(FieldRefNode from,
VarNode to)
|
boolean |
addSimpleEdge(VarNode from,
VarNode to)
|
boolean |
addStoreEdge(VarNode from,
FieldRefNode to)
|
protected boolean |
addToMap(Map<Object,Object> m,
Node key,
Node value)
|
Node[] |
allocInvLookup(VarNode key)
|
Set<Object> |
allocInvSources()
|
Iterator<Object> |
allocInvSourcesIterator()
|
Node[] |
allocLookup(AllocNode key)
|
QueueReader |
allocNodeListener()
|
Set<Object> |
allocSources()
|
Iterator<Object> |
allocSourcesIterator()
|
void |
cleanPAG()
Delete all the assignment edges. |
void |
cleanUpMerges()
|
boolean |
doAddAllocEdge(AllocNode from,
VarNode to)
|
boolean |
doAddLoadEdge(FieldRefNode from,
VarNode to)
|
boolean |
doAddSimpleEdge(VarNode from,
VarNode to)
|
boolean |
doAddStoreEdge(VarNode from,
FieldRefNode to)
|
QueueReader |
edgeReader()
|
AllocDotField |
findAllocDotField(AllocNode an,
SparkField field)
Finds the AllocDotField for base AllocNode an and field field, or returns null. |
ContextVarNode |
findContextVarNode(Object baseValue,
Context context)
Finds the ContextVarNode for base variable value and context context, or returns null. |
FieldRefNode |
findGlobalFieldRefNode(Object baseValue,
SparkField field)
Finds the FieldRefNode for base variable value and field field, or returns null. |
GlobalVarNode |
findGlobalVarNode(Object value)
Finds the GlobalVarNode for the variable value, or returns null. |
FieldRefNode |
findLocalFieldRefNode(Object baseValue,
SparkField field)
Finds the FieldRefNode for base variable value and field field, or returns null. |
LocalVarNode |
findLocalVarNode(Object value)
Finds the LocalVarNode for the variable value, or returns null. |
ArrayNumberer |
getAllocDotFieldNodeNumberer()
|
ArrayNumberer |
getAllocNodeNumberer()
|
List<VarNode> |
getDereferences()
Returns list of dereferences variables. |
ArrayNumberer |
getFieldRefNodeNumberer()
|
Map<Node,Tag> |
getNodeTags()
|
int |
getNumAllocNodes()
|
OnFlyCallGraph |
getOnFlyCallGraph()
|
SparkOptions |
getOpts()
Returns SparkOptions for this graph. |
P2SetFactory |
getSetFactory()
|
TypeManager |
getTypeManager()
|
ArrayNumberer |
getVarNodeNumberer()
|
Node[] |
loadInvLookup(VarNode key)
|
Set<Object> |
loadInvSources()
|
Iterator<Object> |
loadInvSourcesIterator()
|
Node[] |
loadLookup(FieldRefNode key)
|
Set<Object> |
loadSources()
|
Iterator<Object> |
loadSourcesIterator()
|
protected Node[] |
lookup(Map<Object,Object> m,
Object key)
|
Set<Edge> |
lookupEdgesForAssignment(Pair<Node,Node> val)
|
AllocDotField |
makeAllocDotField(AllocNode an,
SparkField field)
Finds or creates the AllocDotField for base variable baseValue and field field, of type t. |
AllocNode |
makeAllocNode(Object newExpr,
Type type,
SootMethod m)
|
AllocNode |
makeClassConstantNode(ClassConstant cc)
|
ContextVarNode |
makeContextVarNode(LocalVarNode base,
Context context)
Finds or creates the ContextVarNode for base variable base and context context, of type type. |
ContextVarNode |
makeContextVarNode(Object baseValue,
Type baseType,
Context context,
SootMethod method)
Finds or creates the ContextVarNode for base variable baseValue and context context, of type type. |
FieldRefNode |
makeFieldRefNode(VarNode base,
SparkField field)
Finds or creates the FieldRefNode for base variable base and field field, of type type. |
FieldRefNode |
makeGlobalFieldRefNode(Object baseValue,
Type baseType,
SparkField field)
Finds or creates the FieldRefNode for base variable baseValue and field field, of type type. |
GlobalVarNode |
makeGlobalVarNode(Object value,
Type type)
Finds or creates the GlobalVarNode for the variable value, of type type. |
FieldRefNode |
makeLocalFieldRefNode(Object baseValue,
Type baseType,
SparkField field,
SootMethod method)
Finds or creates the FieldRefNode for base variable baseValue and field field, of type type. |
LocalVarNode |
makeLocalVarNode(Object value,
Type type,
SootMethod method)
Finds or creates the LocalVarNode for the variable value, of type type. |
AllocNode |
makeStringConstantNode(String s)
|
GlobalNodeFactory |
nodeFactory()
|
OnFlyCallGraph |
ofcg()
|
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 |
setOnFlyCallGraph(OnFlyCallGraph ofcg)
|
Node[] |
simpleInvLookup(VarNode key)
|
Set<Object> |
simpleInvSources()
|
Iterator<Object> |
simpleInvSourcesIterator()
|
Node[] |
simpleLookup(VarNode key)
|
Set<Object> |
simpleSources()
|
Iterator<Object> |
simpleSourcesIterator()
|
Node[] |
storeInvLookup(FieldRefNode key)
|
Set<Object> |
storeInvSources()
|
Iterator<Object> |
storeInvSourcesIterator()
|
Node[] |
storeLookup(VarNode key)
|
Set<Object> |
storeSources()
|
Iterator<Object> |
storeSourcesIterator()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Node[] EMPTY_NODE_ARRAY
protected P2SetFactory setFactory
protected boolean somethingMerged
protected ChunkedQueue edgeQueue
protected SparkOptions opts
protected Map<Object,Object> simple
protected Map<Object,Object> load
protected Map<Object,Object> store
protected Map<Object,Object> alloc
protected Map<Object,Object> simpleInv
protected Map<Object,Object> loadInv
protected Map<Object,Object> storeInv
protected Map<Object,Object> allocInv
protected Map<Pair,Set<Edge>> assign2edges
protected TypeManager typeManager
public int maxFinishNumber
public NativeMethodDriver nativeMethodDriver
public HashMultiMap callAssigns
public Map<InvokeExpr,SootMethod> callToMethod
public Map<InvokeExpr,Node> virtualCallsToReceivers
Constructor Detail |
---|
public PAG(SparkOptions opts)
Method Detail |
---|
public PointsToSet reachingObjects(Local l)
reachingObjects
in interface PointsToAnalysis
public PointsToSet reachingObjects(Context c, Local l)
reachingObjects
in interface PointsToAnalysis
public PointsToSet reachingObjects(SootField f)
reachingObjects
in interface PointsToAnalysis
public PointsToSet reachingObjects(PointsToSet s, SootField f)
reachingObjects
in interface PointsToAnalysis
public PointsToSet reachingObjectsOfArrayElement(PointsToSet s)
reachingObjectsOfArrayElement
in interface PointsToAnalysis
public P2SetFactory getSetFactory()
public void cleanUpMerges()
public boolean doAddSimpleEdge(VarNode from, VarNode to)
public boolean doAddStoreEdge(VarNode from, FieldRefNode to)
public boolean doAddLoadEdge(FieldRefNode from, VarNode to)
public boolean doAddAllocEdge(AllocNode from, VarNode to)
protected Node[] lookup(Map<Object,Object> m, Object key)
public Node[] simpleLookup(VarNode key)
public Node[] simpleInvLookup(VarNode key)
public Node[] loadLookup(FieldRefNode key)
public Node[] loadInvLookup(VarNode key)
public Node[] storeLookup(VarNode key)
public Node[] storeInvLookup(FieldRefNode key)
public Node[] allocLookup(AllocNode key)
public Node[] allocInvLookup(VarNode key)
public Set<Object> simpleSources()
public Set<Object> allocSources()
public Set<Object> storeSources()
public Set<Object> loadSources()
public Set<Object> simpleInvSources()
public Set<Object> allocInvSources()
public Set<Object> storeInvSources()
public Set<Object> loadInvSources()
public Iterator<Object> simpleSourcesIterator()
public Iterator<Object> allocSourcesIterator()
public Iterator<Object> storeSourcesIterator()
public Iterator<Object> loadSourcesIterator()
public Iterator<Object> simpleInvSourcesIterator()
public Iterator<Object> allocInvSourcesIterator()
public Iterator<Object> storeInvSourcesIterator()
public Iterator<Object> loadInvSourcesIterator()
public PointsToSet reachingObjects(Local l, SootField f)
reachingObjects
in interface PointsToAnalysis
public PointsToSet reachingObjects(Context c, Local l, SootField f)
reachingObjects
in interface PointsToAnalysis
public AllocNode makeAllocNode(Object newExpr, Type type, SootMethod m)
public AllocNode makeStringConstantNode(String s)
public AllocNode makeClassConstantNode(ClassConstant cc)
public QueueReader allocNodeListener()
public GlobalVarNode findGlobalVarNode(Object value)
public LocalVarNode findLocalVarNode(Object value)
public GlobalVarNode makeGlobalVarNode(Object value, Type type)
public LocalVarNode makeLocalVarNode(Object value, Type type, SootMethod method)
public ContextVarNode findContextVarNode(Object baseValue, Context context)
public ContextVarNode makeContextVarNode(Object baseValue, Type baseType, Context context, SootMethod method)
public ContextVarNode makeContextVarNode(LocalVarNode base, Context context)
public FieldRefNode findLocalFieldRefNode(Object baseValue, SparkField field)
public FieldRefNode findGlobalFieldRefNode(Object baseValue, SparkField field)
public FieldRefNode makeLocalFieldRefNode(Object baseValue, Type baseType, SparkField field, SootMethod method)
public FieldRefNode makeGlobalFieldRefNode(Object baseValue, Type baseType, SparkField field)
public FieldRefNode makeFieldRefNode(VarNode base, SparkField field)
public AllocDotField findAllocDotField(AllocNode an, SparkField field)
public AllocDotField makeAllocDotField(AllocNode an, SparkField field)
public boolean addSimpleEdge(VarNode from, VarNode to)
public boolean addStoreEdge(VarNode from, FieldRefNode to)
public boolean addLoadEdge(FieldRefNode from, VarNode to)
public boolean addAllocEdge(AllocNode from, VarNode to)
public final boolean addEdge(Node from, Node to)
public QueueReader edgeReader()
public int getNumAllocNodes()
public TypeManager getTypeManager()
public void setOnFlyCallGraph(OnFlyCallGraph ofcg)
public OnFlyCallGraph getOnFlyCallGraph()
public OnFlyCallGraph ofcg()
public void addDereference(VarNode base)
public List<VarNode> getDereferences()
public Map<Node,Tag> getNodeTags()
public ArrayNumberer getAllocNodeNumberer()
public ArrayNumberer getVarNodeNumberer()
public ArrayNumberer getFieldRefNodeNumberer()
public ArrayNumberer getAllocDotFieldNodeNumberer()
public SparkOptions getOpts()
public Pair<Node,Node> addInterproceduralAssignment(Node from, Node to, Edge e)
public Set<Edge> lookupEdgesForAssignment(Pair<Node,Node> val)
public final void addCallTarget(Edge e)
public final void addCallTarget(MethodPAG srcmpag, MethodPAG tgtmpag, Stmt s, Context srcContext, Context tgtContext, Edge e)
public void cleanPAG()
protected boolean addToMap(Map<Object,Object> m, Node key, Node value)
public GlobalNodeFactory nodeFactory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |