Package sootup.core.graph
Class ForwardingControlFlowGraph<V extends BasicBlock<V>>
java.lang.Object
sootup.core.graph.ControlFlowGraph<V>
sootup.core.graph.ForwardingControlFlowGraph<V>
- Direct Known Subclasses:
BackwardsControlFlowGraph
forwarding implementation for encapsulating a ControlFlowGraph.
- Author:
- Markus Schmidt
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsNode(@NonNull Stmt node) intreturns the amount of flows with node as source or target.exceptionalPredecessors(@NonNull Stmt node) it is possible to reach traphandlers through inline code i.e. without any exceptional flowexceptionalSuccessors(@NonNull Stmt node) BasicBlock<?>getBlockOf(@NonNull Stmt stmt) @NonNull Collection<? extends BasicBlock<?>>@NonNull List<? extends BasicBlock<?>>@NonNull Collection<Stmt>getNodes()returns the nodes in this graph in a non-deterministic order (->Set) to get the nodes in linearized, ordered manner use iterator() or getStmts.BasicBlock<?>List<BasicBlock<?>>booleanhasEdgeConnecting(@NonNull Stmt from, @NonNull Stmt to) returns true if there is a flow between source and target throws an Exception if at least one of the parameters is not contained in the graph.intreturns the amount of ingoing flows into nodeiterator()intreturns the amount of flows that start from nodepredecessors(@NonNull Stmt stmt) returns the ingoing flows to node as an List with no reliable/specific order and possibly duplicate entries i.e. if a JSwitchStmt has multiple cases that brnach to `node`voidremoveExceptionalFlowFromAllBlocks(@NonNull ClassType exceptionType, @NonNull Stmt exceptionHandlerStmt) Removes the specified exceptional flow from all blocks.successors(@NonNull Stmt stmt) returns the outgoing flows of node as ordered List.Methods inherited from class sootup.core.graph.ControlFlowGraph
equals, getAllSuccessors, getBlockIterator, getBranchTargetsOf, getEntrypoints, getExtendedBasicBlockPathBetween, getStmts, getTails, isStmtBranchTarget, toString, validateStmtConnectionsInGraphMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
backingGraph
-
-
Constructor Details
-
ForwardingControlFlowGraph
-
-
Method Details
-
getStartingStmt
- Specified by:
getStartingStmtin classControlFlowGraph<V extends BasicBlock<V>>
-
getStartingStmtBlock
- Specified by:
getStartingStmtBlockin classControlFlowGraph<V extends BasicBlock<V>>
-
getTailStmtBlocks
- Specified by:
getTailStmtBlocksin classControlFlowGraph<V extends BasicBlock<V>>
-
getBlockOf
- Specified by:
getBlockOfin classControlFlowGraph<V extends BasicBlock<V>>
-
getNodes
Description copied from class:ControlFlowGraphreturns the nodes in this graph in a non-deterministic order (->Set) to get the nodes in linearized, ordered manner use iterator() or getStmts.- Specified by:
getNodesin classControlFlowGraph<V extends BasicBlock<V>>
-
getBlocks
- Specified by:
getBlocksin classControlFlowGraph<V extends BasicBlock<V>>
-
getBlocksSorted
- Specified by:
getBlocksSortedin classControlFlowGraph<V extends BasicBlock<V>>
-
containsNode
- Specified by:
containsNodein classControlFlowGraph<V extends BasicBlock<V>>
-
predecessors
Description copied from class:ControlFlowGraphreturns the ingoing flows to node as an List with no reliable/specific order and possibly duplicate entries i.e. if a JSwitchStmt has multiple cases that brnach to `node`- Specified by:
predecessorsin classControlFlowGraph<V extends BasicBlock<V>>
-
exceptionalPredecessors
Description copied from class:ControlFlowGraphit is possible to reach traphandlers through inline code i.e. without any exceptional flow- Specified by:
exceptionalPredecessorsin classControlFlowGraph<V extends BasicBlock<V>>
-
successors
Description copied from class:ControlFlowGraphreturns the outgoing flows of node as ordered List. The List can have duplicate entries!- Specified by:
successorsin classControlFlowGraph<V extends BasicBlock<V>>
-
exceptionalSuccessors
- Specified by:
exceptionalSuccessorsin classControlFlowGraph<V extends BasicBlock<V>>
-
degree
Description copied from class:ControlFlowGraphreturns the amount of flows with node as source or target.- Overrides:
degreein classControlFlowGraph<V extends BasicBlock<V>>
-
inDegree
Description copied from class:ControlFlowGraphreturns the amount of ingoing flows into node- Specified by:
inDegreein classControlFlowGraph<V extends BasicBlock<V>>
-
outDegree
Description copied from class:ControlFlowGraphreturns the amount of flows that start from node- Specified by:
outDegreein classControlFlowGraph<V extends BasicBlock<V>>
-
hasEdgeConnecting
Description copied from class:ControlFlowGraphreturns true if there is a flow between source and target throws an Exception if at least one of the parameters is not contained in the graph.- Specified by:
hasEdgeConnectingin classControlFlowGraph<V extends BasicBlock<V>>
-
iterator
- Specified by:
iteratorin interfaceIterable<V extends BasicBlock<V>>- Overrides:
iteratorin classControlFlowGraph<V extends BasicBlock<V>>
-
removeExceptionalFlowFromAllBlocks
public void removeExceptionalFlowFromAllBlocks(@NonNull ClassType exceptionType, @NonNull Stmt exceptionHandlerStmt) Description copied from class:ControlFlowGraphRemoves the specified exceptional flow from all blocks.- Specified by:
removeExceptionalFlowFromAllBlocksin classControlFlowGraph<V extends BasicBlock<V>>- Parameters:
exceptionType- The class type of the exceptional flow.exceptionHandlerStmt- The handler statement of the exceptional flow.
-