CodeQL library for Java
codeql/java-all 0.3.2 (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.

RangeAnalysisPublic
java

Provides all default Java QL imports.

Classes

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.

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.