Module RangeUtils

Provides utility predicates for range analysis.

Import path

semmle.code.java.dataflow.RangeUtils

Imports

java

Provides all default Java QL imports.

Predicates

backEdge

Holds if inp is an input to phi along a back edge.

eqFlowCond

Gets a condition that tests whether v equals e + delta.

getArrayDef

Gets the definition of v provided that v is a non-null array with an explicit ArrayCreationExpr definition and that the definition does not go through a back edge.

guardControlsSsaRead

Holds if guard controls the position controlled with the value testIsTrue.

guardDirectlyControlsSsaRead

Holds if guard directly controls the position controlled with the value testIsTrue.

ssaRead

Gets an expression that equals v - d.

ssaUpdateStep

Holds if v is an SsaExplicitUpdate that equals e + delta.

valueFlowStep

Holds if e1 + delta equals e2.

Classes

ConstantIntegerExpr

An expression that always has the same integer value.

SsaReadPosition

A position at which an SSA variable is read. This includes both ordinary reads occurring in basic blocks and input to phi nodes occurring along an edge between two basic blocks.

SsaReadPositionBlock

A basic block in which an SSA variable is read.

SsaReadPositionPhiInputEdge

An edge between two basic blocks where the latter block has an SSA phi definition. The edge therefore has a read of an SSA variable serving as the input to the phi node.