CodeQL library for JavaScript/TypeScript
codeql/javascript-all 0.8.12 (changelog, source)
Search

Module RangeAnalysis

Contains predicates for reasoning about the relative numeric value of expressions.

Import path

import javascript

Predicates

binaryPhiNode

Holds if node is a phi node with left and right has the only two inputs.

comparisonEdge

Holds if immediately after cfg it becomes known that A <= B + c.

foldedComparisonEdge

Holds if a comparison implies that A <= B + c.

hasNaNIndicator

Holds if the given container has a comment or identifier mentioning NaN.

isContradictoryGuardNode

Holds if the condition asserted at guard is contradictory, that is, its condition always has the opposite of the expected outcome.

linearComparison

Holds if the given comparison can be modeled as A <op> B + bias where <op> is the comparison operator, and A is a * asign and likewise B is b * bsign.

linearComparisonGuard

Holds if guard asserts that the outcome of A <op> B + bias is true, where <op> is a comparison operator.

linearDefinition

Holds if r can be modeled as r = root * sign + bias.

linearDefinitionSum

Holds if r can be modeled as r = xroot * xsign + yroot * ysign + bias.

phiEdge

Holds if A <= B + c can be determined based on a phi node.

seedEdge

The set of initial edges including those from dual constraints.