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

Module CalculateConstants

Given predicates defining boolean and integer constants, this module calculates additional boolean and integer constants using only the rules that apply to compile-time constants.

The input and output predicates are expected to be mutually recursive.

Import path

import semmle.code.java.Constants

Predicates

calculateBooleanValue

Gets the value of a constant boolean expression.

calculateIntValue

Gets the value of a constant integer expression.

Parameters

getBoolValgetBoolValSig
getIntValgetIntValSig