Package com.tonic.analysis.pdg.sdg.node
Class SDGActualInNode
- java.lang.Object
-
- com.tonic.analysis.pdg.node.PDGNode
-
- com.tonic.analysis.pdg.sdg.node.SDGActualInNode
-
public class SDGActualInNode extends PDGNode
SDG node for one actual argument passed at a call site.
-
-
Constructor Summary
Constructors Constructor Description SDGActualInNode(int id, int parameterIndex, Value actualValue, IRBlock block)Creates an actual-in node; the owning call node is set separately.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SSAValuegetActualSSAValue()Narrows the actual argument to an SSA value.ValuegetActualValue()SDGCallNodegetCallNode()SSAValuegetDefinedValue()StringgetLabel()intgetParameterIndex()StringgetParameterName()Names the argument for display, falling back to argN when the value has no name.List<Value>getUsedValues()booleanisSSAValue()voidsetCallNode(SDGCallNode callNode)Links this node back to the call site that owns it.StringtoString()-
Methods inherited from class com.tonic.analysis.pdg.node.PDGNode
addIncomingEdge, addOutgoingEdge, equals, getBlock, getControlDependenceEdges, getDataDependenceEdges, getId, getIncomingEdges, getInDegree, getOutDegree, getOutgoingEdges, getPredecessors, getSuccessors, getTaintLabel, getType, hashCode, hasIncomingEdges, hasOutgoingEdges, isTainted, removeIncomingEdge, removeOutgoingEdge, setBlock, setTainted, setTaintLabel
-
-
-
-
Constructor Detail
-
SDGActualInNode
public SDGActualInNode(int id, int parameterIndex, Value actualValue, IRBlock block)Creates an actual-in node; the owning call node is set separately.- Parameters:
id- the node idparameterIndex- the zero-based argument positionactualValue- the value passed at the call siteblock- the block holding the call
-
-
Method Detail
-
getCallNode
public SDGCallNode getCallNode()
- Returns:
- the call node
-
setCallNode
public void setCallNode(SDGCallNode callNode)
Links this node back to the call site that owns it.- Parameters:
callNode- the owning call node
-
getParameterIndex
public int getParameterIndex()
- Returns:
- the parameter index
-
getActualValue
public Value getActualValue()
- Returns:
- the actual value
-
getLabel
public String getLabel()
-
getUsedValues
public List<Value> getUsedValues()
- Specified by:
getUsedValuesin classPDGNode- Returns:
- the values this node reads
-
getDefinedValue
public SSAValue getDefinedValue()
- Specified by:
getDefinedValuein classPDGNode- Returns:
- the value this node defines, or null if it defines none
-
isSSAValue
public boolean isSSAValue()
- Returns:
- true if the actual argument is an SSA value rather than a constant
-
getActualSSAValue
public SSAValue getActualSSAValue()
Narrows the actual argument to an SSA value.- Returns:
- the SSA value, or null if the argument is not one
-
getParameterName
public String getParameterName()
Names the argument for display, falling back to argN when the value has no name.- Returns:
- the display name
-
-