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

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

import semmle.code.java.dataflow.RangeAnalysis

Imports

Bound

Provides classes for representing abstract bounds for use in, for example, range analysis.

java

Provides all default Java QL imports.

Modules

Aliases

CondReason

A reason for an inferred bound pointing to a condition.

NoReason

A reason for an inferred bound that indicates that the bound is inferred without going through a bounding condition.

Range
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.

bounded

Holds if b + delta is a valid bound for e. - upper = true : e <= b + delta - upper = false : e >= b + delta