Package com.tonic.analysis.pdg.node
Enum PDGNodeType
- java.lang.Object
-
- java.lang.Enum<PDGNodeType>
-
- com.tonic.analysis.pdg.node.PDGNodeType
-
- All Implemented Interfaces:
Serializable,Comparable<PDGNodeType>
public enum PDGNodeType extends Enum<PDGNodeType>
Kind of a program dependence graph node, carrying display text and whether the kind can act as a dependence source or sink.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACTUAL_INThe caller side of an argument, a dependence source bound to the callee's formal-in.ACTUAL_OUTThe caller side of a returned value, a dependence sink bound to the callee's formal-out.BRANCHA conditional transfer, the node other nodes are control dependent on.CALL_SITEAn invocation, which owns the actual-in and actual-out nodes for its arguments and result.ENTRYThe root every unconditionally executed node is control dependent on.EXITThe single sink every return and throw path converges on.FORMAL_INThe callee side of an argument, a dependence source at the method's entry.FORMAL_OUTThe callee side of a returned value, a dependence sink at the method's exit.INSTRUCTIONAn ordinary instruction, carrying dependences but neither starting nor ending a slice.PHIA merge of values arriving on different incoming edges at a join.REGIONA grouping for nodes that share one control condition, so the condition is recorded once.SUMMARYA precomputed argument-to-result dependence for a callee, letting slices cross a call without descending into it.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescription()StringgetDisplayName()booleanisCanBeSink()booleanisCanBeSource()booleanisInterprocedural()booleanisParameterNode()static PDGNodeTypevalueOf(String name)Returns the enum constant of this type with the specified name.static PDGNodeType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ENTRY
public static final PDGNodeType ENTRY
The root every unconditionally executed node is control dependent on.
-
EXIT
public static final PDGNodeType EXIT
The single sink every return and throw path converges on.
-
INSTRUCTION
public static final PDGNodeType INSTRUCTION
An ordinary instruction, carrying dependences but neither starting nor ending a slice.
-
PHI
public static final PDGNodeType PHI
A merge of values arriving on different incoming edges at a join.
-
REGION
public static final PDGNodeType REGION
A grouping for nodes that share one control condition, so the condition is recorded once.
-
BRANCH
public static final PDGNodeType BRANCH
A conditional transfer, the node other nodes are control dependent on.
-
CALL_SITE
public static final PDGNodeType CALL_SITE
An invocation, which owns the actual-in and actual-out nodes for its arguments and result.
-
ACTUAL_IN
public static final PDGNodeType ACTUAL_IN
The caller side of an argument, a dependence source bound to the callee's formal-in.
-
ACTUAL_OUT
public static final PDGNodeType ACTUAL_OUT
The caller side of a returned value, a dependence sink bound to the callee's formal-out.
-
FORMAL_IN
public static final PDGNodeType FORMAL_IN
The callee side of an argument, a dependence source at the method's entry.
-
FORMAL_OUT
public static final PDGNodeType FORMAL_OUT
The callee side of a returned value, a dependence sink at the method's exit.
-
SUMMARY
public static final PDGNodeType SUMMARY
A precomputed argument-to-result dependence for a callee, letting slices cross a call without descending into it.
-
-
Method Detail
-
values
public static PDGNodeType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PDGNodeType c : PDGNodeType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PDGNodeType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getDisplayName
public String getDisplayName()
- Returns:
- the display name
-
getDescription
public String getDescription()
- Returns:
- the description
-
isCanBeSource
public boolean isCanBeSource()
- Returns:
- whether can be source
-
isCanBeSink
public boolean isCanBeSink()
- Returns:
- whether can be sink
-
isInterprocedural
public boolean isInterprocedural()
- Returns:
- true for the call-site, parameter and summary kinds that only appear in an SDG
-
isParameterNode
public boolean isParameterNode()
- Returns:
- true for the actual and formal parameter node kinds
-
-