Skip to content

Commit 30aefab

Browse files
committed
Rangeanalysis: Rename predicate.
1 parent f05b75e commit 30aefab

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/internal/semantic/analysis/RangeAnalysisConstantSpecific.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module CppLangImplConstant implements LangSig<Sem, FloatDelta> {
2222
predicate hasConstantBound(SemExpr e, float bound, boolean upper) { none() }
2323

2424
/**
25-
* Holds if `e >= bound + delta` (if `upper = false`) or `e <= bound + delta` (if `upper = true`).
25+
* Holds if `e2 >= e1 + delta` (if `upper = false`) or `e2 <= e1 + delta` (if `upper = true`).
2626
*/
27-
predicate hasBound(SemExpr e, SemExpr bound, float delta, boolean upper) { none() }
27+
predicate additionalBoundFlowStep(SemExpr e2, SemExpr e1, float delta, boolean upper) { none() }
2828
}

cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/internal/semantic/analysis/RangeAnalysisRelativeSpecific.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ module CppLangImplRelative implements LangSig<Sem, FloatDelta> {
5454
predicate hasConstantBound(SemExpr e, float bound, boolean upper) { none() }
5555

5656
/**
57-
* Holds if `e >= bound + delta` (if `upper = false`) or `e <= bound + delta` (if `upper = true`).
57+
* Holds if `e2 >= e1 + delta` (if `upper = false`) or `e2 <= e1 + delta` (if `upper = true`).
5858
*/
59-
predicate hasBound(SemExpr e, SemExpr bound, float delta, boolean upper) { none() }
59+
predicate additionalBoundFlowStep(SemExpr e2, SemExpr e1, float delta, boolean upper) { none() }
6060
}

java/ql/lib/semmle/code/java/dataflow/RangeAnalysis.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ module JavaLangImpl implements LangSig<Sem, IntDelta> {
332332
/**
333333
* Holds if `e2 >= e1 + delta` (if `upper = false`) or `e2 <= e1 + delta` (if `upper = true`).
334334
*/
335-
predicate hasBound(Sem::Expr e2, Sem::Expr e1, int delta, boolean upper) {
335+
predicate additionalBoundFlowStep(Sem::Expr e2, Sem::Expr e1, int delta, boolean upper) {
336336
exists(RandomDataSource rds |
337337
e2 = rds.getOutput() and
338338
(

shared/rangeanalysis/codeql/rangeanalysis/RangeAnalysis.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ signature module LangSig<Semantic Sem, DeltaSig D> {
270270
predicate hasConstantBound(Sem::Expr e, D::Delta bound, boolean upper);
271271

272272
/**
273-
* Holds if `e >= bound + delta` (if `upper = false`) or `e <= bound + delta` (if `upper = true`).
273+
* Holds if `e2 >= e1 + delta` (if `upper = false`) or `e2 <= e1 + delta` (if `upper = true`).
274274
*/
275-
predicate hasBound(Sem::Expr e, Sem::Expr bound, D::Delta delta, boolean upper);
275+
predicate additionalBoundFlowStep(Sem::Expr e2, Sem::Expr e1, D::Delta delta, boolean upper);
276276

277277
/**
278278
* Ignore the bound on this expression.
@@ -740,7 +740,7 @@ module RangeStage<
740740
delta = D::fromInt(0) and
741741
upper = false
742742
or
743-
hasBound(e2, e1, delta, upper)
743+
additionalBoundFlowStep(e2, e1, delta, upper)
744744
}
745745

746746
/** Holds if `e2 = e1 * factor` and `factor > 0`. */

0 commit comments

Comments
 (0)