Class Flow::ControlFlowNode

A control flow node. Control flow nodes have a many-to-one relation with syntactic nodes, although most syntactic nodes have only one corresponding control flow node. Edges between control flow nodes include exceptional as well as normal control flow.

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

dominates

Whether this dominates other. Note that all nodes dominate themselves.

getAChild
getAFalseSuccessor

Gets a successor for this node if the relevant condition is False.

getANormalSuccessor

Gets a successor for this node if no exception is raised.

getAPredecessor

Gets a predecessor of this flow node

getASuccessor

Gets a successor of this flow node

getATrueSuccessor

Gets a successor for this node if the relevant condition is True.

getAnExceptionalSuccessor

Gets a successor for this node if an exception is raised.

getBasicBlock

Gets the basic block containing this flow node

getEnclosingModule

Gets the enclosing module

getImmediateDominator

Gets the immediate dominator of this flow node

getLocation

Gets the location of this ControlFlowNode

getNode

Gets the syntactic element corresponding to this flow node

getScope

Gets the scope containing this flow node

hasCompletePointsToSet

Check whether this control-flow node has complete points-to information. This would mean that the analysis managed to infer an over approximation of possible values at runtime.

isAttribute

Whether this flow node corresponds to an attribute expression

isAttributeLoad

Use AttrNode.isLoad() instead

isAttributeStore

Use AttrNode.isStore() instead

isAugLoad

Whether this control flow node is a load in an augmented assignment

isAugStore

Whether this control flow node is a store in an augmented assignment

isBranch
isCall

Whether this flow node corresponds to a call

isClass

Whether this flow node corresponds to a class definition expression

isDefinition

Use NameNode.isStore()

isDelete

Whether this control flow node is a delete

isEntryNode

Whether this flow node is the first in its scope

isExceptionalExit

Whether the scope may be exited as a result of this node raising an exception

isFunction

Whether this flow node corresponds to a function definition expression

isIfExp

Whether this flow node corresponds to a conditional expression

isImport

Whether this flow node corresponds to an import

isImportMember

Whether this flow node corresponds to an import member

isLiteral

Whether this flow node corresponds to a literal

isLoad

Whether this control flow node is a load (including those in augmented assignments)

isModuleEntry

Whether this flow node is the first in a module

isNormalExit

Whether this node is a normal (non-exceptional) exit

isParameter

Whether this control flow node is a parameter

isStore

Whether this control flow node is a store (including those in augmented assignments)

isSubscript

Whether this flow node corresponds to an subscript expression

isSubscriptLoad

Use SubscriptNode.isLoad() instead

isSubscriptStore

Use SubscriptNode.isStore() instead

isUse

Use NameNode.isLoad() instead

pointsTo

Use ControlFlowNode.refersTo() instead.

refersTo

Gets what this flow node might “refer-to”. Performs a combination of localized (intra-procedural) points-to analysis and global module-level analysis. This points-to analysis favours precision over recall. It is highly precise, but may not provide information for a significant number of flow-nodes. If the class is unimportant then use refersTo(value) or refersTo(value, origin) instead.

refersTo

Gets what this expression might “refer-to” in the given context.

refersTo

Whether this flow node might “refer-to” to value which is from origin Unlike this.refersTo(value, _, origin) this predicate includes results where the class cannot be inferred.

refersTo

Equivalent to this.refersTo(value, _)

strictlyDominates

Whether this strictly dominates other.

strictlyReaches

Whether this strictly reaches other.

toString
unlikelyReachable

Whether it is unlikely that this ControlFlowNode can be reached