public class PDG<T extends InstanceKey> extends java.lang.Object implements com.ibm.wala.util.graph.NumberedGraph<Statement>
| Modifier and Type | Class and Description |
|---|---|
static class |
PDG.Dependency |
| Constructor and Description |
|---|
PDG(CGNode node,
PointerAnalysis<T> pa,
java.util.Map<CGNode,com.ibm.wala.util.intset.OrdinalSet<PointerKey>> mod,
java.util.Map<CGNode,com.ibm.wala.util.intset.OrdinalSet<PointerKey>> ref,
Slicer.DataDependenceOptions dOptions,
Slicer.ControlDependenceOptions cOptions,
HeapExclusions exclusions,
CallGraph cg,
ModRef<T> modRef) |
PDG(CGNode node,
PointerAnalysis<T> pa,
java.util.Map<CGNode,com.ibm.wala.util.intset.OrdinalSet<PointerKey>> mod,
java.util.Map<CGNode,com.ibm.wala.util.intset.OrdinalSet<PointerKey>> ref,
Slicer.DataDependenceOptions dOptions,
Slicer.ControlDependenceOptions cOptions,
HeapExclusions exclusions,
CallGraph cg,
ModRef<T> modRef,
boolean ignoreAllocHeapDefs) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(Statement src,
Statement dst) |
void |
addNode(Statement n) |
static java.util.Map<SSAInstruction,java.lang.Integer> |
computeInstructionIndices(IR ir) |
boolean |
containsNode(Statement N) |
boolean |
equals(java.lang.Object obj) |
java.util.Set<Statement> |
getCallerParamStatements(SSAAbstractInvokeInstruction call)
return the set of all PARAM_CALLER and HEAP_PARAM_CALLER statements associated with a given
call
|
java.util.Set<Statement> |
getCallerReturnStatements(SSAAbstractInvokeInstruction call)
return the set of all NORMAL_RETURN_CALLER and HEAP_RETURN_CALLER statements associated with a
given call.
|
CGNode |
getCallGraphNode() |
java.util.Set<Statement> |
getCallStatements(SSAAbstractInvokeInstruction call)
return the set of all PARAM_CALLER, HEAP_PARAM_CALLER, and NORMAL statements (i.e., the actual
call statement) associated with a given call
|
int |
getMaxNumber() |
Statement |
getNode(int number) |
int |
getNumber(Statement N) |
int |
getNumberOfNodes() |
Statement[] |
getParamCalleeStatements() |
int |
getPredNodeCount(Statement N) |
com.ibm.wala.util.intset.IntSet |
getPredNodeNumbers(Statement node) |
java.util.Iterator<Statement> |
getPredNodes(Statement N) |
Statement[] |
getReturnStatements() |
int |
getSuccNodeCount(Statement N) |
com.ibm.wala.util.intset.IntSet |
getSuccNodeNumbers(Statement node) |
java.util.Iterator<Statement> |
getSuccNodes(Statement N) |
boolean |
hasEdge(Statement src,
Statement dst) |
int |
hashCode() |
boolean |
isControlDependend(Statement from,
Statement to) |
java.util.Iterator<Statement> |
iterateNodes(com.ibm.wala.util.intset.IntSet s) |
java.util.Iterator<Statement> |
iterator() |
void |
removeAllIncidentEdges(Statement node) |
void |
removeEdge(Statement src,
Statement dst) |
void |
removeIncomingEdges(Statement node) |
void |
removeNode(Statement n) |
void |
removeNodeAndEdges(Statement N) |
void |
removeOutgoingEdges(Statement node) |
static Statement |
ssaInstruction2Statement(CGNode node,
SSAInstruction s,
java.util.Map<SSAInstruction,java.lang.Integer> instructionIndices,
IR ir) |
java.util.stream.Stream<Statement> |
stream() |
java.lang.String |
toString() |
public PDG(CGNode node, PointerAnalysis<T> pa, java.util.Map<CGNode,com.ibm.wala.util.intset.OrdinalSet<PointerKey>> mod, java.util.Map<CGNode,com.ibm.wala.util.intset.OrdinalSet<PointerKey>> ref, Slicer.DataDependenceOptions dOptions, Slicer.ControlDependenceOptions cOptions, HeapExclusions exclusions, CallGraph cg, ModRef<T> modRef)
mod - the set of heap locations which may be written (transitively) by this node. These
are logically return values in the SDG.ref - the set of heap locations which may be read (transitively) by this node. These are
logically parameters in the SDG.java.lang.IllegalArgumentException - if node is nullpublic PDG(CGNode node, PointerAnalysis<T> pa, java.util.Map<CGNode,com.ibm.wala.util.intset.OrdinalSet<PointerKey>> mod, java.util.Map<CGNode,com.ibm.wala.util.intset.OrdinalSet<PointerKey>> ref, Slicer.DataDependenceOptions dOptions, Slicer.ControlDependenceOptions cOptions, HeapExclusions exclusions, CallGraph cg, ModRef<T> modRef, boolean ignoreAllocHeapDefs)
mod - the set of heap locations which may be written (transitively) by this node. These
are logically return values in the SDG.ref - the set of heap locations which may be read (transitively) by this node. These are
logically parameters in the SDG.java.lang.IllegalArgumentException - if node is nullpublic java.util.Set<Statement> getCallerParamStatements(SSAAbstractInvokeInstruction call) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic java.util.Set<Statement> getCallStatements(SSAAbstractInvokeInstruction call) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic java.util.Set<Statement> getCallerReturnStatements(SSAAbstractInvokeInstruction call) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static Statement ssaInstruction2Statement(CGNode node, SSAInstruction s, java.util.Map<SSAInstruction,java.lang.Integer> instructionIndices, IR ir)
public static java.util.Map<SSAInstruction,java.lang.Integer> computeInstructionIndices(IR ir)
public java.lang.String toString()
toString in class java.lang.Objectpublic Statement[] getParamCalleeStatements()
public Statement[] getReturnStatements()
public CGNode getCallGraphNode()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int getPredNodeCount(Statement N) throws com.ibm.wala.util.debug.UnimplementedError
getPredNodeCount in interface com.ibm.wala.util.graph.EdgeManager<Statement>com.ibm.wala.util.debug.UnimplementedErrorpublic java.util.Iterator<Statement> getPredNodes(Statement N)
getPredNodes in interface com.ibm.wala.util.graph.EdgeManager<Statement>public int getSuccNodeCount(Statement N) throws com.ibm.wala.util.debug.UnimplementedError
getSuccNodeCount in interface com.ibm.wala.util.graph.EdgeManager<Statement>com.ibm.wala.util.debug.UnimplementedErrorpublic java.util.Iterator<Statement> getSuccNodes(Statement N)
getSuccNodes in interface com.ibm.wala.util.graph.EdgeManager<Statement>public boolean hasEdge(Statement src, Statement dst) throws com.ibm.wala.util.debug.UnimplementedError
hasEdge in interface com.ibm.wala.util.graph.EdgeManager<Statement>com.ibm.wala.util.debug.UnimplementedErrorpublic void removeNodeAndEdges(Statement N) throws java.lang.UnsupportedOperationException
removeNodeAndEdges in interface com.ibm.wala.util.graph.Graph<Statement>java.lang.UnsupportedOperationExceptionpublic void addNode(Statement n)
addNode in interface com.ibm.wala.util.graph.NodeManager<Statement>public boolean containsNode(Statement N)
containsNode in interface com.ibm.wala.util.graph.NodeManager<Statement>public int getNumberOfNodes()
getNumberOfNodes in interface com.ibm.wala.util.graph.NodeManager<Statement>public java.util.Iterator<Statement> iterator()
public java.util.stream.Stream<Statement> stream()
stream in interface com.ibm.wala.util.graph.NodeManager<Statement>public void removeNode(Statement n)
removeNode in interface com.ibm.wala.util.graph.NodeManager<Statement>public void addEdge(Statement src, Statement dst)
addEdge in interface com.ibm.wala.util.graph.EdgeManager<Statement>public void removeAllIncidentEdges(Statement node) throws java.lang.UnsupportedOperationException
removeAllIncidentEdges in interface com.ibm.wala.util.graph.EdgeManager<Statement>java.lang.UnsupportedOperationExceptionpublic void removeEdge(Statement src, Statement dst) throws java.lang.UnsupportedOperationException
removeEdge in interface com.ibm.wala.util.graph.EdgeManager<Statement>java.lang.UnsupportedOperationExceptionpublic void removeIncomingEdges(Statement node) throws java.lang.UnsupportedOperationException
removeIncomingEdges in interface com.ibm.wala.util.graph.EdgeManager<Statement>java.lang.UnsupportedOperationExceptionpublic void removeOutgoingEdges(Statement node) throws java.lang.UnsupportedOperationException
removeOutgoingEdges in interface com.ibm.wala.util.graph.EdgeManager<Statement>java.lang.UnsupportedOperationExceptionpublic int getMaxNumber()
getMaxNumber in interface com.ibm.wala.util.graph.NumberedNodeManager<Statement>public Statement getNode(int number)
getNode in interface com.ibm.wala.util.graph.NumberedNodeManager<Statement>public int getNumber(Statement N)
getNumber in interface com.ibm.wala.util.graph.NumberedNodeManager<Statement>public java.util.Iterator<Statement> iterateNodes(com.ibm.wala.util.intset.IntSet s)
iterateNodes in interface com.ibm.wala.util.graph.NumberedNodeManager<Statement>public com.ibm.wala.util.intset.IntSet getPredNodeNumbers(Statement node)
getPredNodeNumbers in interface com.ibm.wala.util.graph.NumberedEdgeManager<Statement>public com.ibm.wala.util.intset.IntSet getSuccNodeNumbers(Statement node)
getSuccNodeNumbers in interface com.ibm.wala.util.graph.NumberedEdgeManager<Statement>