Provides guards and predicates to reason about arithmetic.
Import path
import semmle.code.java.security.ArithmeticCommon
Imports
Guards | Provides classes and predicates for reasoning about guards and the control flow elements controlled by those guards.
|
Overflow | |
Predicates
guardedGreaterThanSomething | Holds if e is bounded in a way that is likely to prevent underflow.
|
guardedLessThanSomething | Holds if e is bounded in a way that is likely to prevent overflow.
|
narrowerThanOrEqualTo | Holds if the type of exp is narrower than or equal to numType , or there is an enclosing cast to a type at least as narrow as ‘numType’.
|
overflowBarrier | Holds if n is likely guarded against overflow.
|
overflowIrrelevant | Holds if overflow/underflow is irrelevant for this expression.
|
overflowSink | Holds if use is an operand of exp that acts as a sink for overflow-related dataflow.
|
underflowBarrier | Holds if n is likely guarded against underflow.
|
underflowSink | Holds if use is an operand of exp that acts as a sink for underflow-related dataflow.
|
upcastToWiderType | Holds if e occurs in a context where it will be upcast to a wider type.
|