soot.jimple.spark.pag
Class PAG

java.lang.Object
  extended bysoot.jimple.spark.pag.AbstractPAG
      extended bysoot.jimple.spark.pag.PAG
All Implemented Interfaces:
PointsToAnalysis

public class PAG
extends AbstractPAG

Pointer assignment graph.

Author:
Ondrej Lhotak

Field Summary
protected static Node[] EMPTY_NODE_ARRAY
           
protected  P2SetFactory setFactory
           
protected  boolean somethingMerged
           
 
Fields inherited from class soot.jimple.spark.pag.AbstractPAG
alloc, allocInv, edgeQueue, load, loadInv, maxFinishNumber, opts, simple, simpleInv, store, storeInv, typeManager
 
Fields inherited from interface soot.PointsToAnalysis
ARRAY_ELEMENTS_NODE, CAST_NODE, DEFAULT_CLASS_LOADER, DEFAULT_CLASS_LOADER_LOCAL, EXCEPTION_NODE, 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, RETURN_NODE, RETURN_STRING_CONSTANT_NODE, STRING_ARRAY_NODE, STRING_ARRAY_NODE_LOCAL, STRING_NODE, STRING_NODE_LOCAL, THIS_NODE, THROW_NODE
 
Constructor Summary
PAG(soot.options.SparkOptions opts)
           
 
Method Summary
 Node[] allocInvLookup(VarNode key)
           
 java.util.Set allocInvSources()
           
 java.util.Iterator allocInvSourcesIterator()
           
 Node[] allocLookup(AllocNode key)
           
 java.util.Set allocSources()
           
 java.util.Iterator allocSourcesIterator()
           
 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)
           
 P2SetFactory getSetFactory()
           
 Node[] loadInvLookup(VarNode key)
           
 java.util.Set loadInvSources()
           
 java.util.Iterator loadInvSourcesIterator()
           
 Node[] loadLookup(FieldRefNode key)
           
 java.util.Set loadSources()
           
 java.util.Iterator loadSourcesIterator()
           
protected  Node[] lookup(java.util.Map m, java.lang.Object key)
           
 PointsToSet reachingObjects(Local l)
          Returns the set of objects pointed to by variable 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.
 Node[] simpleInvLookup(VarNode key)
           
 java.util.Set simpleInvSources()
           
 java.util.Iterator simpleInvSourcesIterator()
           
 Node[] simpleLookup(VarNode key)
           
 java.util.Set simpleSources()
           
 java.util.Iterator simpleSourcesIterator()
           
 Node[] storeInvLookup(FieldRefNode key)
           
 java.util.Set storeInvSources()
           
 java.util.Iterator storeInvSourcesIterator()
           
 Node[] storeLookup(VarNode key)
           
 java.util.Set storeSources()
           
 java.util.Iterator storeSourcesIterator()
           
 
Methods inherited from class soot.jimple.spark.pag.AbstractPAG
addAllocEdge, addCallTarget, addCallTarget, addDereference, addEdge, addLoadEdge, addSimpleEdge, addStoreEdge, addToMap, allocNodeListener, edgeReader, findAllocDotField, findContextVarNode, findGlobalFieldRefNode, findGlobalVarNode, findLocalFieldRefNode, findLocalVarNode, getAllocDotFieldNodeNumberer, getAllocNodeNumberer, getDereferences, getFieldRefNodeNumberer, getNodeTags, getNumAllocNodes, getOnFlyCallGraph, getOpts, getTypeManager, getVarNodeNumberer, makeAllocDotField, makeAllocNode, makeClassConstantNode, makeContextVarNode, makeContextVarNode, makeFieldRefNode, makeGlobalFieldRefNode, makeGlobalVarNode, makeLocalFieldRefNode, makeLocalVarNode, makeStringConstantNode, nodeFactory, ofcg, reachingObjects, setOnFlyCallGraph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_NODE_ARRAY

protected static final Node[] EMPTY_NODE_ARRAY

setFactory

protected P2SetFactory setFactory

somethingMerged

protected boolean somethingMerged
Constructor Detail

PAG

public PAG(soot.options.SparkOptions opts)
Method Detail

reachingObjects

public PointsToSet reachingObjects(Local l)
Returns the set of objects pointed to by variable l.


reachingObjects

public PointsToSet reachingObjects(SootField f)
Returns the set of objects pointed to by static field f.


reachingObjects

public PointsToSet reachingObjects(PointsToSet s,
                                   SootField f)
Returns the set of objects pointed to by instance field f of the objects in the PointsToSet s.


reachingObjectsOfArrayElement

public PointsToSet reachingObjectsOfArrayElement(PointsToSet s)
Returns the set of objects pointed to by elements of the arrays in the PointsToSet s.


getSetFactory

public P2SetFactory getSetFactory()
Overrides:
getSetFactory in class AbstractPAG

cleanUpMerges

public void cleanUpMerges()

doAddSimpleEdge

public boolean doAddSimpleEdge(VarNode from,
                               VarNode to)
Specified by:
doAddSimpleEdge in class AbstractPAG

doAddStoreEdge

public boolean doAddStoreEdge(VarNode from,
                              FieldRefNode to)
Specified by:
doAddStoreEdge in class AbstractPAG

doAddLoadEdge

public boolean doAddLoadEdge(FieldRefNode from,
                             VarNode to)
Specified by:
doAddLoadEdge in class AbstractPAG

doAddAllocEdge

public boolean doAddAllocEdge(AllocNode from,
                              VarNode to)
Specified by:
doAddAllocEdge in class AbstractPAG

lookup

protected Node[] lookup(java.util.Map m,
                        java.lang.Object key)

simpleLookup

public Node[] simpleLookup(VarNode key)

simpleInvLookup

public Node[] simpleInvLookup(VarNode key)

loadLookup

public Node[] loadLookup(FieldRefNode key)

loadInvLookup

public Node[] loadInvLookup(VarNode key)

storeLookup

public Node[] storeLookup(VarNode key)

storeInvLookup

public Node[] storeInvLookup(FieldRefNode key)

allocLookup

public Node[] allocLookup(AllocNode key)

allocInvLookup

public Node[] allocInvLookup(VarNode key)

simpleSources

public java.util.Set simpleSources()

allocSources

public java.util.Set allocSources()

storeSources

public java.util.Set storeSources()

loadSources

public java.util.Set loadSources()

simpleInvSources

public java.util.Set simpleInvSources()

allocInvSources

public java.util.Set allocInvSources()

storeInvSources

public java.util.Set storeInvSources()

loadInvSources

public java.util.Set loadInvSources()

simpleSourcesIterator

public java.util.Iterator simpleSourcesIterator()
Specified by:
simpleSourcesIterator in class AbstractPAG

allocSourcesIterator

public java.util.Iterator allocSourcesIterator()
Specified by:
allocSourcesIterator in class AbstractPAG

storeSourcesIterator

public java.util.Iterator storeSourcesIterator()
Specified by:
storeSourcesIterator in class AbstractPAG

loadSourcesIterator

public java.util.Iterator loadSourcesIterator()
Specified by:
loadSourcesIterator in class AbstractPAG

simpleInvSourcesIterator

public java.util.Iterator simpleInvSourcesIterator()
Specified by:
simpleInvSourcesIterator in class AbstractPAG

allocInvSourcesIterator

public java.util.Iterator allocInvSourcesIterator()
Specified by:
allocInvSourcesIterator in class AbstractPAG

storeInvSourcesIterator

public java.util.Iterator storeInvSourcesIterator()
Specified by:
storeInvSourcesIterator in class AbstractPAG

loadInvSourcesIterator

public java.util.Iterator loadInvSourcesIterator()
Specified by:
loadInvSourcesIterator in class AbstractPAG