CodeQL library for Java
codeql/java-all 0.5.1 (changelog, source)
Search

Module SsaImpl

Import path

import semmle.code.java.dataflow.SSA

Predicates

certainVariableUpdate

Holds if n must update the locally tracked variable v.

firstUse

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

getDestVar

Gets the destination variable of an update of a tracked variable.

hasEntryDef

Holds if v has an implicit definition at the entry, b, of the callable.

phiNode

Holds if a phi node for v is needed at the beginning of basic block b.

relevantFieldUpdate

Holds if fw is an update of f in c that is relevant for SSA construction.

uncertainVariableUpdate

Holds if n might update the locally tracked variable v.

updatesNamedField

Holds if there exists a call-chain originating in call that can update f on some instance where f and call share the same enclosing callable in which a FieldRead of f is reachable from call.

Modules

SsaDefReaches

The construction of SSA form ensures that each use of a variable is dominated by its definition. A definition of an SSA variable therefore reaches a ControlFlowNode if it is the closest SSA variable definition that dominates the node. If two definitions dominate a node then one must dominate the other, so therefore the definition of closest is given by the dominator tree. Thus, reaching definitions can be calculated in terms of dominance.

SsaPublic