public class PegGraph extends Object implements DirectedGraph
| Modifier and Type | Field and Description |
|---|---|
protected Map<AllocNode,String> |
allocNodeToObj |
protected Map<AllocNode,PegChain> |
allocNodeToThread |
protected Map<JPegStmt,Chain> |
joinStmtToThread |
HashMap |
startToAllocNodes |
HashMap<JPegStmt,List> |
startToThread |
protected Map |
threadNameToStart |
protected Map |
threadNo |
protected HashMap<Object,List> |
unitToPreds |
protected HashMap<Object,List> |
unitToSuccs |
| Constructor and Description |
|---|
PegGraph(CallGraph callGraph,
Hierarchy hierarchy,
PAG pag,
Set<Object> methodsNeedingInlining,
Set<AllocNode> allocNodes,
List inlineSites,
Map synchObj,
Set<AllocNode> multiRunAllocNodes,
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,
Set methodsNeedingInlining,
Set allocNodes,
List<List> inlineSites,
Map<SootMethod,String> synchObj,
Set multiRunAllocNodes,
Map<AllocNode,String> allocNodeToObj,
Body unitBody,
String threadName,
SootMethod sm,
boolean addExceEdge,
boolean dontAddEdgeFromStmtBeforeAreaOfProtectionToCatchBlock)
Constructs a graph for the units found in the provided Body instance.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic HashMap startToAllocNodes
protected Map threadNo
protected Map threadNameToStart
public PegGraph(CallGraph callGraph, Hierarchy hierarchy, PAG pag, Set<Object> methodsNeedingInlining, Set<AllocNode> allocNodes, List inlineSites, Map synchObj, Set<AllocNode> multiRunAllocNodes, 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, Set methodsNeedingInlining, Set allocNodes, List<List> inlineSites, Map<SootMethod,String> synchObj, Set multiRunAllocNodes, Map<AllocNode,String> allocNodeToObj, Body unitBody, 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 Map getStartToBeginNodes()
protected 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 HashMap getUnitToSuccs()
protected HashMap getUnitToPreds()
public Body getBody()
public List getHeads()
DirectedGraphgetHeads in interface DirectedGraphpublic List getTails()
DirectedGraphgetTails in interface DirectedGraphpublic List getPredsOf(Object s)
DirectedGraphgetPredsOf in interface DirectedGraphpublic List getSuccsOf(Object s)
DirectedGraphgetSuccsOf in interface DirectedGraphpublic Set getCanNotBeCompacted()
public int size()
DirectedGraphsize in interface DirectedGraphpublic Iterator mainIterator()
public Iterator iterator()
DirectedGraphiterator in interface Iterableiterator in interface DirectedGraphprotected Set getThreadAllocSites()
public Map getStartToAllocNodes()
protected Map getThreadNameToStart()
public PegChain getMainPegChain()
public Set getMethodsNeedingInlining()
protected void testIterator()
public void testWaitingNodes()
protected void testStartToThread()
protected void testUnitToPeg(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(List list)
public void testMonitor()
Copyright © 2020 Soot OSS. All rights reserved.