Package com.tonic.analysis.pdg.sdg.node
Class SDGFormalOutNode
- java.lang.Object
-
- com.tonic.analysis.pdg.node.PDGNode
-
- com.tonic.analysis.pdg.sdg.node.SDGFormalOutNode
-
public class SDGFormalOutNode extends PDGNode
System dependence graph node for a method's returned value at its exit; it uses the returned SSA value and defines nothing.
-
-
Constructor Summary
Constructors Constructor Description SDGFormalOutNode(int id, SSAValue returnValue, String returnType, IRBlock exitBlock)Creates a formal-out 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()StringgetLabel()StringgetParameterName()StringgetReturnType()SSAValuegetReturnValue()List<Value>getUsedValues()booleanhasReturnValue()booleanisVoidReturn()voidsetEntryNode(SDGEntryNode entryNode)Links this return 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
-
SDGFormalOutNode
public SDGFormalOutNode(int id, SSAValue returnValue, String returnType, IRBlock exitBlock)Creates a formal-out node that is not yet linked to its entry node.- Parameters:
id- node idreturnValue- SSA value returned, or null for a void methodreturnType- return descriptor, may be nullexitBlock- the method's exit block
-
-
Method Detail
-
getEntryNode
public SDGEntryNode getEntryNode()
- Returns:
- the entry node
-
setEntryNode
public void setEntryNode(SDGEntryNode entryNode)
Links this return back to the entry node of its owning method.- Parameters:
entryNode- owning method's entry node
-
getReturnValue
public SSAValue getReturnValue()
- Returns:
- the return value
-
getReturnType
public String getReturnType()
- Returns:
- the return 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
-
hasReturnValue
public boolean hasReturnValue()
- Returns:
- true if an SSA value was bound as the returned value
-
isVoidReturn
public boolean isVoidReturn()
- Returns:
- true if the return descriptor is "V" or was never recorded
-
getParameterName
public String getParameterName()
- Returns:
- the returned SSA value's name, or "return" when no value is bound
-
-