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

Module SsaComputeImpl::AdjacentUsesImpl

Import path

import semmle.python.essa.SsaCompute

Predicates

adjacentUseUse

Holds if use1 and use2 form an adjacent use-use-pair of the same SsaSourceVariable, that is, the value read in use1 can reach use2 without passing through any other use or any SSA definition of the variable except for phi nodes.

adjacentUseUseSameVar

Holds if use1 and use2 form an adjacent use-use-pair of the same SSA variable, that is, the value read in use1 can reach use2 without passing through any other use or any SSA definition of the variable.

adjacentVarRefs

Holds if v occurs at index i1 in b1 and at index i2 in b2 and there is a path between them without any occurrence of v.

defSourceUseRank

Holds if rankix is the rank the index i at which there is an SSA definition or explicit use of v in the basic block b.

definesAt

Holds if def defines v at the specified position. Phi nodes are placed at index -1.

firstUse

Holds if the value defined at def can reach use without passing through any other uses, but possibly through phi nodes.

useOfDef

Holds if the value defined at def can reach use, possibly through phi nodes.

variableSourceUse

Holds if there is a variable access use of v in b at index i.