CodeQL library for Python
codeql/python-all 0.11.13 (changelog, source)
Search

Class AttrNode

A control flow corresponding to an attribute expression, such as value.attr

Import path

import python

Direct supertypes

Indirect supertypes

Known direct subtypes

    Predicates

    getName

    Gets the attribute name of the attribute expression corresponding to this flow node

    getNode

    Gets the syntactic element corresponding to this flow node

    getObject

    Gets the flow node corresponding to the object of the attribute expression corresponding to this flow node

    getObject

    Gets the flow node corresponding to the object of the attribute expression corresponding to this flow node, with the matching name

    Inherited predicates

    dominates

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

    from ControlFlowNode
    getAChildfrom ControlFlowNode
    getAFalseSuccessor

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

    from ControlFlowNode
    getANormalSuccessor

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

    from ControlFlowNode
    getAPredecessor

    Gets a predecessor of this flow node

    from ControlFlowNode
    getASuccessor

    Gets a successor of this flow node

    from ControlFlowNode
    getATrueSuccessor

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

    from ControlFlowNode
    getAnExceptionalSuccessor

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

    from ControlFlowNode
    getBasicBlock

    Gets the basic block containing this flow node

    from ControlFlowNode
    getEnclosingModule

    Gets the enclosing module

    from ControlFlowNode
    getImmediateDominator

    Gets the immediate dominator of this flow node

    from ControlFlowNode
    getLocation

    Gets the location of this ControlFlowNode

    from ControlFlowNode
    getScope

    Gets the scope containing this flow node

    from ControlFlowNode
    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.

    from ControlFlowNode
    inferredValue

    Gets a value that this ControlFlowNode may points-to.

    from ControlFlowNode
    isAttribute

    Whether this flow node corresponds to an attribute expression

    from ControlFlowNode
    isAugLoad

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

    from ControlFlowNode
    isAugStore

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

    from ControlFlowNode
    isBranch

    Holds if this CFG node is a branch

    from ControlFlowNode
    isCall

    Whether this flow node corresponds to a call

    from ControlFlowNode
    isClass

    Whether this flow node corresponds to a class definition expression

    from ControlFlowNode
    isDelete

    Whether this control flow node is a delete

    from ControlFlowNode
    isEntryNode

    Whether this flow node is the first in its scope

    from ControlFlowNode
    isExceptionalExit

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

    from ControlFlowNode
    isFunction

    Whether this flow node corresponds to a function definition expression

    from ControlFlowNode
    isIfExp

    Whether this flow node corresponds to a conditional expression

    from ControlFlowNode
    isImport

    Whether this flow node corresponds to an import

    from ControlFlowNode
    isImportMember

    Whether this flow node corresponds to an import member

    from ControlFlowNode
    isLiteral

    Whether this flow node corresponds to a literal

    from ControlFlowNode
    isLoad

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

    from ControlFlowNode
    isModuleEntry

    Whether this flow node is the first in a module

    from ControlFlowNode
    isNormalExit

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

    from ControlFlowNode
    isParameter

    Whether this control flow node is a parameter

    from ControlFlowNode
    isStore

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

    from ControlFlowNode
    isSubscript

    Whether this flow node corresponds to an subscript expression

    from ControlFlowNode
    pointsTo

    Gets the value that this ControlFlowNode points-to.

    from ControlFlowNode
    pointsTo

    Gets the value that this ControlFlowNode points-to.

    from ControlFlowNode
    pointsTo

    Gets the value and origin that this ControlFlowNode points-to.

    from ControlFlowNode
    pointsTo

    Gets the value and origin that this ControlFlowNode points-to, given the context.

    from ControlFlowNode
    refersTo

    Equivalent to this.refersTo(value, _)

    from ControlFlowNode
    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.

    from ControlFlowNode
    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.

    from ControlFlowNode
    refersTo

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

    from ControlFlowNode
    strictlyDominates

    Whether this strictly dominates other.

    from ControlFlowNode
    strictlyReaches

    Whether this strictly reaches other.

    from ControlFlowNode
    toString

    Gets a textual representation of this element.

    from ControlFlowNode
    unlikelyReachable

    Whether it is unlikely that this ControlFlowNode can be reached

    from ControlFlowNode

    Charpred