Class Strategy
java.lang.Object
de.fraunhofer.aisec.cpg.processing.strategy.Strategy
public class Strategy
extends java.lang.Object
Strategies (iterators) for traversing graphs to be used by visitors.
-
Method Summary
Modifier and Type Method Description static @NonNull java.util.Iterator<de.fraunhofer.aisec.cpg.graph.Node>AST_FORWARD(@NonNull de.fraunhofer.aisec.cpg.graph.Node x)Traverse AST in forward direction.static @NonNull java.util.Iterator<de.fraunhofer.aisec.cpg.graph.Node>DFG_BACKWARD(@NonNull de.fraunhofer.aisec.cpg.graph.Node x)Traverse Data Flow Graph in backward direction.static @NonNull java.util.Iterator<de.fraunhofer.aisec.cpg.graph.Node>DFG_FORWARD(@NonNull de.fraunhofer.aisec.cpg.graph.Node x)Traverse Data Flow Graph in forward direction.static @NonNull java.util.Iterator<de.fraunhofer.aisec.cpg.graph.Node>EOG_BACKWARD(@NonNull de.fraunhofer.aisec.cpg.graph.Node x)Traverse Evaluation Order Graph in backward direction.static @NonNull java.util.Iterator<de.fraunhofer.aisec.cpg.graph.Node>EOG_FORWARD(@NonNull de.fraunhofer.aisec.cpg.graph.Node x)Traverse Evaluation Order Graph in forward direction.static @NonNull java.util.Iterator<de.fraunhofer.aisec.cpg.graph.Node>NO_STRATEGY(@NonNull de.fraunhofer.aisec.cpg.graph.Node x)Do not traverse any nodes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
NO_STRATEGY
public static @NonNull java.util.Iterator<de.fraunhofer.aisec.cpg.graph.Node> NO_STRATEGY(@NonNull de.fraunhofer.aisec.cpg.graph.Node x)Do not traverse any nodes.- Parameters:
x-- Returns:
-
EOG_FORWARD
public static @NonNull java.util.Iterator<de.fraunhofer.aisec.cpg.graph.Node> EOG_FORWARD(@NonNull de.fraunhofer.aisec.cpg.graph.Node x)Traverse Evaluation Order Graph in forward direction.- Parameters:
x- Current node in EOG.- Returns:
- Iterator over successors.
-
EOG_BACKWARD
public static @NonNull java.util.Iterator<de.fraunhofer.aisec.cpg.graph.Node> EOG_BACKWARD(@NonNull de.fraunhofer.aisec.cpg.graph.Node x)Traverse Evaluation Order Graph in backward direction.- Parameters:
x- Current node in EOG.- Returns:
- Iterator over successors.
-
DFG_FORWARD
public static @NonNull java.util.Iterator<de.fraunhofer.aisec.cpg.graph.Node> DFG_FORWARD(@NonNull de.fraunhofer.aisec.cpg.graph.Node x)Traverse Data Flow Graph in forward direction.- Parameters:
x- Current node in DFG.- Returns:
- Iterator over successors.
-
DFG_BACKWARD
public static @NonNull java.util.Iterator<de.fraunhofer.aisec.cpg.graph.Node> DFG_BACKWARD(@NonNull de.fraunhofer.aisec.cpg.graph.Node x)Traverse Data Flow Graph in backward direction.- Parameters:
x- Current node in DFG.- Returns:
- Iterator over successors.
-
AST_FORWARD
public static @NonNull java.util.Iterator<de.fraunhofer.aisec.cpg.graph.Node> AST_FORWARD(@NonNull de.fraunhofer.aisec.cpg.graph.Node x)Traverse AST in forward direction.- Parameters:
x-- Returns:
-