Module RangeAnalysis
Provides an AST-based interface to the relative range analysis, which tracks bounds of the form
a <= b + delta
for expressions a
and b
and an integer offset delta
.
Import path
import semmle.code.cpp.rangeanalysis.new.RangeAnalysis
Predicates
bounded | Holds if e is bounded by |
convertedBounded | Holds if e is bounded by |
Classes
Bound | A bound that may be inferred for an expression plus/minus an integer delta. |
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 |
ValueNumberBound | A bound corresponding to the value of an |
ZeroBound | The bound that corresponds to the integer 0. This is used to represent all integer bounds as bounds are always accompanied by an added integer delta. |