public class PegGraph extends java.lang.Object implements DirectedGraph
| Modifier and Type | Field and Description | 
|---|---|
| protected java.util.Map<AllocNode,java.lang.String> | allocNodeToObj | 
| protected java.util.Map<AllocNode,PegChain> | allocNodeToThread | 
| protected java.util.Map<JPegStmt,Chain> | joinStmtToThread | 
| java.util.HashMap | startToAllocNodes | 
| java.util.HashMap<JPegStmt,java.util.List> | startToThread | 
| protected java.util.Map | threadNameToStart | 
| protected java.util.Map | threadNo | 
| protected java.util.HashMap<java.lang.Object,java.util.List> | unitToPreds | 
| protected java.util.HashMap<java.lang.Object,java.util.List> | unitToSuccs | 
| Constructor and Description | 
|---|
| PegGraph(CallGraph callGraph,
        Hierarchy hierarchy,
        PAG pag,
        java.util.Set<java.lang.Object> methodsNeedingInlining,
        java.util.Set<AllocNode> allocNodes,
        java.util.List inlineSites,
        java.util.Map synchObj,
        java.util.Set<AllocNode> multiRunAllocNodes,
        java.util.Map allocNodeToObj,
        Body unitBody,
        SootMethod sm,
        boolean addExceptionEdges,
        boolean dontAddEdgeFromStmtBeforeAreaOfProtectionToCatchBlock)Constructs  a graph for the units found in the provided
   Body instance. | 
| PegGraph(CallGraph callGraph,
        Hierarchy hierarchy,
        PAG pag,
        java.util.Set methodsNeedingInlining,
        java.util.Set allocNodes,
        java.util.List<java.util.List> inlineSites,
        java.util.Map<SootMethod,java.lang.String> synchObj,
        java.util.Set multiRunAllocNodes,
        java.util.Map<AllocNode,java.lang.String> allocNodeToObj,
        Body unitBody,
        java.lang.String threadName,
        SootMethod sm,
        boolean addExceEdge,
        boolean dontAddEdgeFromStmtBeforeAreaOfProtectionToCatchBlock)Constructs  a graph for the units found in the provided
   Body instance. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | addMonitorStmt() | 
| boolean | addPeg(PegGraph pg,
      Chain chain) | 
| protected void | addTag() | 
| protected void | buildMaps(PegGraph pg) | 
| protected void | buildPreds() | 
| protected void | buildSuccsForInlining(JPegStmt stmt,
                     Chain chain,
                     PegGraph inlinee) | 
| protected void | computeEdgeAndThreadNo() | 
| void | computeMonitorObjs() | 
| protected FlowSet | getAllNodes() | 
| protected java.util.Map<AllocNode,java.lang.String> | getAllocNodeToObj() | 
| java.util.Map<AllocNode,PegChain> | getAllocNodeToThread() | 
| Body | getBody() | 
| java.util.Set | getCanNotBeCompacted() | 
| protected java.util.Set<Unit> | getExceHandlers() | 
| java.util.List | getHeads()Returns a list of entry points for this graph. | 
| protected java.util.Map<JPegStmt,Chain> | getJoinStmtToThread() | 
| PegChain | getMainPegChain() | 
| java.util.Set | getMethodsNeedingInlining() | 
| java.util.Map<java.lang.String,FlowSet> | getMonitor() | 
| java.util.Set<java.lang.Object> | getMonitorObjs() | 
| protected boolean | getNeedInlining() | 
| java.util.Map<java.lang.String,java.util.Set<JPegStmt>> | getNotifyAll() | 
| java.util.List | getPredsOf(java.lang.Object s)Returns a list of predecessors for the given node in the graph. | 
| protected java.util.Set<JPegStmt> | getSpecialJoin() | 
| java.util.Map | getStartToAllocNodes() | 
| protected java.util.Map | getStartToBeginNodes() | 
| java.util.Map<JPegStmt,java.util.List> | getStartToThread() | 
| java.util.List | getSuccsOf(java.lang.Object s)Returns a list of successors for the given node in the graph. | 
| java.util.HashSet<java.util.List> | getSynch() | 
| java.util.List | getTails()Returns a list of exit points for this graph. | 
| protected java.util.Set | getThreadAllocSites() | 
| protected java.util.Map | getThreadNameToStart() | 
| protected java.util.Map | getUnitToPegMap() | 
| protected java.util.HashMap | getUnitToPreds() | 
| protected java.util.HashMap | getUnitToSuccs() | 
| protected java.util.Map<java.lang.String,FlowSet> | getWaitingNodes() | 
| java.util.Iterator | iterator()Returns an iterator for the nodes in this graph. | 
| java.util.Iterator | mainIterator() | 
| protected void | setMonitor(java.util.Map<java.lang.String,FlowSet> m) | 
| int | size()Returns the node count for this graph. | 
| protected void | testIterator() | 
| protected void | testJoinStmtToThread() | 
| protected void | testList(java.util.List list) | 
| void | testMonitor() | 
| protected void | testPegChain(Chain chain) | 
| protected void | testSet(java.util.Set set,
       java.lang.String name) | 
| protected void | testStartToThread() | 
| protected void | testSynch() | 
| protected void | testThreadNameToStart() | 
| protected void | testUnitToPeg(java.util.HashMap unitToPeg) | 
| protected void | testUnitToPred() | 
| protected void | testUnitToSucc() | 
| void | testWaitingNodes() | 
| java.lang.String | toString() | 
protected java.util.HashMap<java.lang.Object,java.util.List> unitToSuccs
protected java.util.HashMap<java.lang.Object,java.util.List> unitToPreds
public java.util.HashMap<JPegStmt,java.util.List> startToThread
public java.util.HashMap startToAllocNodes
protected java.util.Map threadNo
protected java.util.Map threadNameToStart
protected java.util.Map<AllocNode,java.lang.String> allocNodeToObj
public PegGraph(CallGraph callGraph, Hierarchy hierarchy, PAG pag, java.util.Set<java.lang.Object> methodsNeedingInlining, java.util.Set<AllocNode> allocNodes, java.util.List inlineSites, java.util.Map synchObj, java.util.Set<AllocNode> multiRunAllocNodes, java.util.Map allocNodeToObj, Body unitBody, SootMethod sm, boolean addExceptionEdges, boolean dontAddEdgeFromStmtBeforeAreaOfProtectionToCatchBlock)
Body - The underlying body of main threadaddExceptionEdges - If true then the control flow edges associated with
                             exceptions are added.Hierarchy - Using class hierarchy analysis to find the run method of started threadPointsToAnalysis - Using point to analysis (SPARK package) to improve the precision of resultspublic PegGraph(CallGraph callGraph, Hierarchy hierarchy, PAG pag, java.util.Set methodsNeedingInlining, java.util.Set allocNodes, java.util.List<java.util.List> inlineSites, java.util.Map<SootMethod,java.lang.String> synchObj, java.util.Set multiRunAllocNodes, java.util.Map<AllocNode,java.lang.String> allocNodeToObj, Body unitBody, java.lang.String threadName, SootMethod sm, boolean addExceEdge, boolean dontAddEdgeFromStmtBeforeAreaOfProtectionToCatchBlock)
body - The underlying body we want to make a
                             graph for.addExceptionEdges - If true then the control flow edges associated with
                             exceptions are added.dontAddEdgeFromStmtBeforeAreaOfProtectionToCatchBlock - This was added for Dava.
                             If true, edges are not added from statement before area of
                             protection to catch. If false, edges ARE added. For Dava,
                             it should be true. For flow analyses, it should be false.Hierarchy - Using class hierarchy analysis to find the run method of started threadPointsToAnalysis - Using point to analysis (SPARK package) to improve the precision of resultsprotected java.util.Map getStartToBeginNodes()
protected java.util.Map getUnitToPegMap()
protected void addMonitorStmt()
protected void buildSuccsForInlining(JPegStmt stmt, Chain chain, PegGraph inlinee)
protected void buildMaps(PegGraph pg)
protected void buildPreds()
public void computeMonitorObjs()
protected boolean getNeedInlining()
protected FlowSet getAllNodes()
protected java.util.HashMap getUnitToSuccs()
protected java.util.HashMap getUnitToPreds()
public Body getBody()
public java.util.List getHeads()
DirectedGraphgetHeads in interface DirectedGraphpublic java.util.List getTails()
DirectedGraphgetTails in interface DirectedGraphpublic java.util.List getPredsOf(java.lang.Object s)
DirectedGraphgetPredsOf in interface DirectedGraphpublic java.util.List getSuccsOf(java.lang.Object s)
DirectedGraphgetSuccsOf in interface DirectedGraphpublic java.util.Set getCanNotBeCompacted()
public int size()
DirectedGraphsize in interface DirectedGraphpublic java.util.Iterator mainIterator()
public java.util.Iterator iterator()
DirectedGraphiterator in interface java.lang.Iterableiterator in interface DirectedGraphpublic java.lang.String toString()
toString in class java.lang.Objectprotected java.util.Set<Unit> getExceHandlers()
protected void setMonitor(java.util.Map<java.lang.String,FlowSet> m)
public java.util.Map<java.lang.String,FlowSet> getMonitor()
public java.util.Set<java.lang.Object> getMonitorObjs()
protected java.util.Set getThreadAllocSites()
protected java.util.Set<JPegStmt> getSpecialJoin()
public java.util.HashSet<java.util.List> getSynch()
public java.util.Map<JPegStmt,java.util.List> getStartToThread()
public java.util.Map getStartToAllocNodes()
protected java.util.Map<java.lang.String,FlowSet> getWaitingNodes()
public java.util.Map<java.lang.String,java.util.Set<JPegStmt>> getNotifyAll()
protected java.util.Map<AllocNode,java.lang.String> getAllocNodeToObj()
protected java.util.Map getThreadNameToStart()
public PegChain getMainPegChain()
public java.util.Set getMethodsNeedingInlining()
protected void testIterator()
public void testWaitingNodes()
protected void testStartToThread()
protected void testUnitToPeg(java.util.HashMap unitToPeg)
protected void testUnitToSucc()
protected void testUnitToPred()
protected void addTag()
protected void testSynch()
protected void testThreadNameToStart()
protected void testJoinStmtToThread()
protected void testPegChain(Chain chain)
protected void computeEdgeAndThreadNo()
protected void testList(java.util.List list)
protected void testSet(java.util.Set set,
                       java.lang.String name)
public void testMonitor()