Module RangeAnalysis

Provides classes and predicates for range analysis.

An inferred bound can either be a specific integer, the abstract value of an SSA variable, or the abstract value of an interesting expression. The latter category includes array lengths that are not SSA variables.

If an inferred bound relies directly on a condition, then this condition is reported as the reason for the bound.

Import path

semmle.code.java.dataflow.RangeAnalysis

Imports

Bound
RangeAnalysisPublic
java

Provides all default Java QL imports.

Classes

CondReason
NoReason
Reason

A reason for an inferred bound. This can either be CondReason if the bound is due to a specific condition, or NoReason if the bound is inferred without going through a bounding condition.