Skip to content

Commit 6d6f89e

Browse files
committed
Rangeanalysis: Remove superfluous ignoreSsaReadArithmeticExpr.
1 parent a39a94c commit 6d6f89e

File tree

5 files changed

+2
-30
lines changed

5 files changed

+2
-30
lines changed

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ module CppLangImplConstant implements LangSig<Sem, FloatDelta> {
3232
*/
3333
predicate ignoreZeroLowerBound(SemExpr e) { none() }
3434

35-
/**
36-
* Holds if the specified expression should be excluded from the result of `ssaRead()`.
37-
*
38-
* This predicate is to keep the results identical to the original Java implementation. It should be
39-
* removed once we have the new implementation matching the old results exactly.
40-
*/
41-
predicate ignoreSsaReadArithmeticExpr(SemExpr e) { none() }
42-
4335
/**
4436
* Holds if the specified variable should be excluded from the result of `ssaRead()`.
4537
*

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,6 @@ module CppLangImplRelative implements LangSig<Sem, FloatDelta> {
6464
*/
6565
predicate ignoreZeroLowerBound(SemExpr e) { none() }
6666

67-
/**
68-
* Holds if the specified expression should be excluded from the result of `ssaRead()`.
69-
*
70-
* This predicate is to keep the results identical to the original Java implementation. It should be
71-
* removed once we have the new implementation matching the old results exactly.
72-
*/
73-
predicate ignoreSsaReadArithmeticExpr(SemExpr e) { none() }
74-
7567
/**
7668
* Holds if the specified variable should be excluded from the result of `ssaRead()`.
7769
*

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@ module RangeUtil<DeltaSig D, LangSig<Sem, D> Lang> implements UtilSig<Sem, D> {
1919
or
2020
exists(D::Delta d1, SemConstantIntegerExpr c |
2121
result.(SemAddExpr).hasOperands(semSsaRead(v, d1), c) and
22-
delta = D::fromFloat(D::toFloat(d1) - c.getIntValue()) and
23-
not Lang::ignoreSsaReadArithmeticExpr(result)
22+
delta = D::fromFloat(D::toFloat(d1) - c.getIntValue())
2423
)
2524
or
2625
exists(SemSubExpr sub, D::Delta d1, SemConstantIntegerExpr c |
2726
result = sub and
2827
sub.getLeftOperand() = semSsaRead(v, d1) and
2928
sub.getRightOperand() = c and
30-
delta = D::fromFloat(D::toFloat(d1) + c.getIntValue()) and
31-
not Lang::ignoreSsaReadArithmeticExpr(result)
29+
delta = D::fromFloat(D::toFloat(d1) + c.getIntValue())
3230
)
3331
or
3432
result = v.(SemSsaExplicitUpdate).getSourceExpr() and

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,6 @@ module JavaLangImpl implements LangSig<Sem, IntDelta> {
377377

378378
predicate ignoreZeroLowerBound(Sem::Expr e) { none() }
379379

380-
predicate ignoreSsaReadArithmeticExpr(Sem::Expr e) { none() }
381-
382380
predicate ignoreSsaReadAssignment(Sem::SsaVariable v) { none() }
383381

384382
Sem::Expr specificSsaRead(Sem::SsaVariable v, int delta) { none() }

shared/rangeanalysis/codeql/rangeanalysis/RangeAnalysis.qll

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -284,14 +284,6 @@ signature module LangSig<Semantic Sem, DeltaSig D> {
284284
*/
285285
predicate ignoreZeroLowerBound(Sem::Expr e);
286286

287-
/**
288-
* Holds if the specified expression should be excluded from the result of `ssaRead()`.
289-
*
290-
* This predicate is to keep the results identical to the original Java implementation. It should be
291-
* removed once we have the new implementation matching the old results exactly.
292-
*/
293-
predicate ignoreSsaReadArithmeticExpr(Sem::Expr e);
294-
295287
/**
296288
* Holds if the specified variable should be excluded from the result of `ssaRead()`.
297289
*

0 commit comments

Comments
 (0)