@@ -485,7 +485,7 @@ private predicate isRecursiveDef(RangeSsaDefinition def, StackVariable v) {
485485 * This predicate finds all the definitions in the first set.
486486 */
487487private predicate assignmentDef ( RangeSsaDefinition def , StackVariable v , Expr expr ) {
488- v . getUnspecifiedType ( ) instanceof ArithmeticType and
488+ getVariableRangeType ( v ) instanceof ArithmeticType and
489489 (
490490 def = v .getInitializer ( ) .getExpr ( ) and def = expr
491491 or
@@ -1329,7 +1329,7 @@ private float getDefLowerBounds(RangeSsaDefinition def, StackVariable v) {
13291329 // recursion from exploding.
13301330 result =
13311331 max ( float widenLB |
1332- widenLB = wideningLowerBounds ( v . getUnspecifiedType ( ) ) and
1332+ widenLB = wideningLowerBounds ( getVariableRangeType ( v ) ) and
13331333 not widenLB > truncatedLB
13341334 |
13351335 widenLB
@@ -1359,7 +1359,7 @@ private float getDefUpperBounds(RangeSsaDefinition def, StackVariable v) {
13591359 // from exploding.
13601360 result =
13611361 min ( float widenUB |
1362- widenUB = wideningUpperBounds ( v . getUnspecifiedType ( ) ) and
1362+ widenUB = wideningUpperBounds ( getVariableRangeType ( v ) ) and
13631363 not widenUB < truncatedUB
13641364 |
13651365 widenUB
@@ -1391,9 +1391,10 @@ private predicate unanalyzableDefBounds(RangeSsaDefinition def, StackVariable v,
13911391 */
13921392bindingset [ guard, v, branch]
13931393predicate nonNanGuardedVariable ( ComparisonOperation guard , VariableAccess v , boolean branch ) {
1394- v . getUnspecifiedType ( ) instanceof IntegralType
1394+ getVariableRangeType ( v . getTarget ( ) ) instanceof IntegralType
13951395 or
1396- v .getUnspecifiedType ( ) instanceof FloatingPointType and v instanceof NonNanVariableAccess
1396+ getVariableRangeType ( v .getTarget ( ) ) instanceof FloatingPointType and
1397+ v instanceof NonNanVariableAccess
13971398 or
13981399 // The reason the following case is here is to ensure that when we say
13991400 // `if (x > 5) { ...then... } else { ...else... }`
@@ -1418,7 +1419,7 @@ private predicate lowerBoundFromGuard(
14181419 then
14191420 if
14201421 strictness = Nonstrict ( ) or
1421- not v . getUnspecifiedType ( ) instanceof IntegralType
1422+ not getVariableRangeType ( v . getTarget ( ) ) instanceof IntegralType
14221423 then lb = childLB
14231424 else lb = childLB + 1
14241425 else lb = varMinVal ( v .getTarget ( ) )
@@ -1440,7 +1441,7 @@ private predicate upperBoundFromGuard(
14401441 then
14411442 if
14421443 strictness = Nonstrict ( ) or
1443- not v . getUnspecifiedType ( ) instanceof IntegralType
1444+ not getVariableRangeType ( v . getTarget ( ) ) instanceof IntegralType
14441445 then ub = childUB
14451446 else ub = childUB - 1
14461447 else ub = varMaxVal ( v .getTarget ( ) )
0 commit comments