Rangeanalysis: Remove superfluous ignoreSsaReadArithmeticExpr.

This commit is contained in:
Anders Schack-Mulligen
2023-10-31 15:25:28 +01:00
parent a39a94ca8e
commit 6d6f89e71e
5 changed files with 2 additions and 30 deletions

View File

@@ -32,14 +32,6 @@ module CppLangImplConstant implements LangSig<Sem, FloatDelta> {
*/
predicate ignoreZeroLowerBound(SemExpr e) { none() }
/**
* Holds if the specified expression should be excluded from the result of `ssaRead()`.
*
* This predicate is to keep the results identical to the original Java implementation. It should be
* removed once we have the new implementation matching the old results exactly.
*/
predicate ignoreSsaReadArithmeticExpr(SemExpr e) { none() }
/**
* Holds if the specified variable should be excluded from the result of `ssaRead()`.
*

View File

@@ -64,14 +64,6 @@ module CppLangImplRelative implements LangSig<Sem, FloatDelta> {
*/
predicate ignoreZeroLowerBound(SemExpr e) { none() }
/**
* Holds if the specified expression should be excluded from the result of `ssaRead()`.
*
* This predicate is to keep the results identical to the original Java implementation. It should be
* removed once we have the new implementation matching the old results exactly.
*/
predicate ignoreSsaReadArithmeticExpr(SemExpr e) { none() }
/**
* Holds if the specified variable should be excluded from the result of `ssaRead()`.
*

View File

@@ -19,16 +19,14 @@ module RangeUtil<DeltaSig D, LangSig<Sem, D> Lang> implements UtilSig<Sem, D> {
or
exists(D::Delta d1, SemConstantIntegerExpr c |
result.(SemAddExpr).hasOperands(semSsaRead(v, d1), c) and
delta = D::fromFloat(D::toFloat(d1) - c.getIntValue()) and
not Lang::ignoreSsaReadArithmeticExpr(result)
delta = D::fromFloat(D::toFloat(d1) - c.getIntValue())
)
or
exists(SemSubExpr sub, D::Delta d1, SemConstantIntegerExpr c |
result = sub and
sub.getLeftOperand() = semSsaRead(v, d1) and
sub.getRightOperand() = c and
delta = D::fromFloat(D::toFloat(d1) + c.getIntValue()) and
not Lang::ignoreSsaReadArithmeticExpr(result)
delta = D::fromFloat(D::toFloat(d1) + c.getIntValue())
)
or
result = v.(SemSsaExplicitUpdate).getSourceExpr() and

View File

@@ -377,8 +377,6 @@ module JavaLangImpl implements LangSig<Sem, IntDelta> {
predicate ignoreZeroLowerBound(Sem::Expr e) { none() }
predicate ignoreSsaReadArithmeticExpr(Sem::Expr e) { none() }
predicate ignoreSsaReadAssignment(Sem::SsaVariable v) { none() }
Sem::Expr specificSsaRead(Sem::SsaVariable v, int delta) { none() }

View File

@@ -284,14 +284,6 @@ signature module LangSig<Semantic Sem, DeltaSig D> {
*/
predicate ignoreZeroLowerBound(Sem::Expr e);
/**
* Holds if the specified expression should be excluded from the result of `ssaRead()`.
*
* This predicate is to keep the results identical to the original Java implementation. It should be
* removed once we have the new implementation matching the old results exactly.
*/
predicate ignoreSsaReadArithmeticExpr(Sem::Expr e);
/**
* Holds if the specified variable should be excluded from the result of `ssaRead()`.
*