Package com.tonic.analysis.pdg.sdg.node
Class SDGFormalInNode
- java.lang.Object
-
- com.tonic.analysis.pdg.node.PDGNode
-
- com.tonic.analysis.pdg.sdg.node.SDGFormalInNode
-
public class SDGFormalInNode extends PDGNode
System dependence graph node for one formal parameter at a method entry; it defines the parameter's SSA value and uses nothing.
-
-
Constructor Summary
Constructors Constructor Description SDGFormalInNode(int id, int parameterIndex, SSAValue formalParameter, String parameterType, IRBlock entryBlock)Creates a formal-in node that is not yet linked to its entry node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SSAValuegetDefinedValue()SDGEntryNodegetEntryNode()SSAValuegetFormalParameter()StringgetLabel()intgetParameterIndex()StringgetParameterName()StringgetParameterType()List<Value>getUsedValues()booleanhasParameterType()voidsetEntryNode(SDGEntryNode entryNode)Links this parameter back to the entry node of its owning method.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
-
SDGFormalInNode
public SDGFormalInNode(int id, int parameterIndex, SSAValue formalParameter, String parameterType, IRBlock entryBlock)Creates a formal-in node that is not yet linked to its entry node.- Parameters:
id- node idparameterIndex- zero-based parameter positionformalParameter- SSA value defined for the parameter, may be nullparameterType- parameter descriptor, may be nullentryBlock- the method's entry block
-
-
Method Detail
-
getEntryNode
public SDGEntryNode getEntryNode()
- Returns:
- the entry node
-
setEntryNode
public void setEntryNode(SDGEntryNode entryNode)
Links this parameter back to the entry node of its owning method.- Parameters:
entryNode- owning method's entry node
-
getParameterIndex
public int getParameterIndex()
- Returns:
- the parameter index
-
getFormalParameter
public SSAValue getFormalParameter()
- Returns:
- the formal parameter
-
getParameterType
public String getParameterType()
- Returns:
- the parameter type
-
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
-
hasParameterType
public boolean hasParameterType()
- Returns:
- true if a descriptor was recorded for this parameter
-
getParameterName
public String getParameterName()
- Returns:
- the SSA value's name, or "paramN" when no formal value is bound
-
-