diff --git a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/RangeAnalysisUtils.qll b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/RangeAnalysisUtils.qll index 07c6ee1cd2b3..2423a3a71a0a 100644 --- a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/RangeAnalysisUtils.qll +++ b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/RangeAnalysisUtils.qll @@ -1,10 +1,10 @@ import cpp /** - * Describes whether a relation is 'strict' (that is, a `<` or `>` + * The strictness of a relation. Either 'strict' (that is, a `<` or `>` * relation) or 'non-strict' (a `<=` or `>=` relation). */ -newtype RelationStrictness = +newtype TRelationStrictness = /** * Represents that a relation is 'strict' (that is, a `<` or `>` relation). */ @@ -14,6 +14,19 @@ newtype RelationStrictness = */ Nonstrict() +/** + * The strictness of a relation. Either 'strict' (that is, a `<` or `>` + * relation) or 'non-strict' (a `<=` or `>=` relation). + */ +class RelationStrictness extends TRelationStrictness { + /** Gets the string representation of this relation strictness. */ + string toString() { + this = Strict() and result = "strict" + or + this = Nonstrict() and result = "non-strict" + } +} + /** * Describes whether a relation is 'greater' (that is, a `>` or `>=` * relation) or 'lesser' (a `<` or `<=` relation). @@ -105,10 +118,10 @@ predicate relOpWithSwap( * * This allows for the relation to be either as written, or with its * arguments reversed; for example, if `rel` is `x < 5` then - * `relOpWithSwapAndNegate(rel, x, 5, Lesser(), Strict(), true)`, - * `relOpWithSwapAndNegate(rel, 5, x, Greater(), Strict(), true)`, - * `relOpWithSwapAndNegate(rel, x, 5, Greater(), Nonstrict(), false)` and - * `relOpWithSwapAndNegate(rel, 5, x, Lesser(), Nonstrict(), false)` hold. + * - `relOpWithSwapAndNegate(rel, x, 5, Lesser(), Strict(), true)`, + * - `relOpWithSwapAndNegate(rel, 5, x, Greater(), Strict(), true)`, + * - `relOpWithSwapAndNegate(rel, x, 5, Greater(), Nonstrict(), false)` and + * - `relOpWithSwapAndNegate(rel, 5, x, Lesser(), Nonstrict(), false)` hold. */ predicate relOpWithSwapAndNegate( RelationalOperation rel, Expr a, Expr b, RelationDirection dir, RelationStrictness strict, diff --git a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll index 673d0c3c4eaa..e8f5b67028d8 100644 --- a/cpp/ql/lib/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll +++ b/cpp/ql/lib/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll @@ -1397,6 +1397,20 @@ predicate nonNanGuardedVariable(Expr guard, VariableAccess v, boolean branch) { nanExcludingComparison(guard, branch) } +/** + * Adjusts a lower bound to its meaning for integral types. + * + * Examples: + * `>= 3.0` becomes `3.0` + * ` > 3.0` becomes `4.0` + * `>= 3.5` becomes `4.0` + * ` > 3.5` becomes `4.0` + */ +bindingset[strictness, lb] +private float adjustLowerBoundIntegral(RelationStrictness strictness, float lb) { + if strictness = Nonstrict() and lb.floor() = lb then result = lb else result = safeFloor(lb) + 1 +} + /** * If the guard is a comparison of the form `p*v + q r`, then this * predicate uses the bounds information for `r` to compute a lower bound @@ -1408,15 +1422,27 @@ private predicate lowerBoundFromGuard(Expr guard, VariableAccess v, float lb, bo | if nonNanGuardedVariable(guard, v, branch) then - if - strictness = Nonstrict() or - not getVariableRangeType(v.getTarget()) instanceof IntegralType - then lb = childLB - else lb = childLB + 1 + if getVariableRangeType(v.getTarget()) instanceof IntegralType + then lb = adjustLowerBoundIntegral(strictness, childLB) + else lb = childLB else lb = varMinVal(v.getTarget()) ) } +/** + * Adjusts an upper bound to its meaning for integral types. + * + * Examples: + * `<= 3.0` becomes `3.0` + * ` < 3.0` becomes `2.0` + * `<= 3.5` becomes `3.0` + * ` < 3.5` becomes `3.0` + */ +bindingset[strictness, ub] +private float adjustUpperBoundIntegral(RelationStrictness strictness, float ub) { + if strictness = Strict() and ub.floor() = ub then result = ub - 1 else result = safeFloor(ub) +} + /** * If the guard is a comparison of the form `p*v + q r`, then this * predicate uses the bounds information for `r` to compute a upper bound @@ -1428,11 +1454,9 @@ private predicate upperBoundFromGuard(Expr guard, VariableAccess v, float ub, bo | if nonNanGuardedVariable(guard, v, branch) then - if - strictness = Nonstrict() or - not getVariableRangeType(v.getTarget()) instanceof IntegralType - then ub = childUB - else ub = childUB - 1 + if getVariableRangeType(v.getTarget()) instanceof IntegralType + then ub = adjustUpperBoundIntegral(strictness, childUB) + else ub = childUB else ub = varMaxVal(v.getTarget()) ) } @@ -1472,7 +1496,7 @@ private predicate boundFromGuard( * lower or upper bound for `v`. */ private predicate linearBoundFromGuard( - ComparisonOperation guard, VariableAccess v, float p, float q, float boundValue, + ComparisonOperation guard, VariableAccess v, float p, float q, float r, boolean isLowerBound, // Is this a lower or an upper bound? RelationStrictness strictness, boolean branch // Which control-flow branch is this bound valid on? ) { @@ -1487,11 +1511,11 @@ private predicate linearBoundFromGuard( | isLowerBound = directionIsGreater(dir) and strictness = st and - getBounds(rhs, boundValue, isLowerBound) + getBounds(rhs, r, isLowerBound) or isLowerBound = directionIsLesser(dir) and strictness = Nonstrict() and - exprTypeBounds(rhs, boundValue, isLowerBound) + exprTypeBounds(rhs, r, isLowerBound) ) or // For x == RHS, we create the following bounds: @@ -1502,7 +1526,7 @@ private predicate linearBoundFromGuard( exists(Expr lhs, Expr rhs | linearAccess(lhs, v, p, q) and eqOpWithSwapAndNegate(guard, lhs, rhs, true, branch) and - getBounds(rhs, boundValue, isLowerBound) and + getBounds(rhs, r, isLowerBound) and strictness = Nonstrict() ) // x != RHS and !x are handled elsewhere @@ -1860,3 +1884,34 @@ module SimpleRangeAnalysisInternal { defMightOverflowNegatively(def, v) and result = varMaxVal(v) } } + +/** Provides predicates for debugging the simple range analysis library. */ +private module Debug { + Locatable getRelevantLocatable() { + exists(string filepath, int startline | + result.getLocation().hasLocationInfo(filepath, startline, _, _, _) and + filepath.matches("%/test.c") and + startline = [464 .. 472] + ) + } + + float debugGetFullyConvertedLowerBounds(Expr expr) { + expr = getRelevantLocatable() and + result = getFullyConvertedLowerBounds(expr) + } + + float debugGetLowerBoundsImpl(Expr e, string kl) { + e = getRelevantLocatable() and + result = getLowerBoundsImpl(e) and + kl = e.getPrimaryQlClasses() + } + + /** + * Counts the number of lower bounds for a given expression. This predicate is + * useful for identifying performance issues in the range analysis. + */ + predicate nrOfLowerBounds(Expr e, int n) { + e = getRelevantLocatable() and + n = strictcount(float lb | lb = getLowerBoundsImpl(e) | lb) + } +} diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/lowerBound.expected b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/lowerBound.expected index bc8f42dafc3f..9bd56e8cf600 100644 --- a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/lowerBound.expected +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/lowerBound.expected @@ -350,332 +350,347 @@ | test.c:330:5:330:9 | total | -2147483648 | | test.c:330:14:330:14 | r | -2147483648 | | test.c:333:10:333:14 | total | -2147483648 | -| test.c:338:7:338:7 | x | -2147483648 | -| test.c:342:10:342:10 | i | 0 | -| test.c:343:5:343:5 | i | 0 | -| test.c:345:3:345:3 | d | -2147483648 | -| test.c:345:7:345:7 | i | 3 | -| test.c:346:7:346:7 | x | 0 | -| test.c:347:9:347:9 | d | 3 | -| test.c:347:14:347:14 | x | 0 | -| test.c:357:3:357:4 | y1 | 0 | -| test.c:357:8:357:8 | x | 0 | -| test.c:357:18:357:18 | x | 0 | -| test.c:358:3:358:4 | y2 | 0 | -| test.c:358:8:358:8 | x | 0 | -| test.c:358:24:358:24 | x | 0 | -| test.c:359:3:359:4 | y3 | 0 | -| test.c:360:3:360:4 | y4 | 0 | -| test.c:361:3:361:4 | y5 | 0 | -| test.c:362:3:362:4 | y6 | 0 | -| test.c:363:3:363:4 | y7 | 0 | -| test.c:364:3:364:4 | y8 | 0 | -| test.c:365:7:365:7 | x | 0 | -| test.c:366:5:366:6 | y3 | 0 | -| test.c:366:10:366:10 | x | 0 | -| test.c:367:5:367:6 | y4 | 0 | -| test.c:367:10:367:10 | x | 0 | -| test.c:368:5:368:6 | y5 | 0 | -| test.c:368:11:368:11 | x | 0 | -| test.c:369:5:369:6 | y6 | 0 | -| test.c:369:27:369:27 | x | 0 | -| test.c:370:5:370:6 | y7 | 0 | -| test.c:370:27:370:27 | x | 0 | -| test.c:371:5:371:6 | y8 | 0 | -| test.c:371:28:371:28 | x | 0 | -| test.c:373:10:373:11 | y1 | 0 | -| test.c:373:15:373:16 | y2 | 0 | -| test.c:373:20:373:21 | y3 | 0 | -| test.c:373:25:373:26 | y4 | 0 | -| test.c:373:30:373:31 | y5 | 0 | -| test.c:373:35:373:36 | y6 | 0 | -| test.c:373:40:373:41 | y7 | 0 | -| test.c:373:45:373:46 | y8 | 0 | -| test.c:379:3:379:4 | y1 | 0 | -| test.c:379:8:379:8 | x | 0 | -| test.c:379:18:379:18 | x | 101 | -| test.c:380:3:380:4 | y2 | 0 | -| test.c:380:8:380:8 | x | 0 | -| test.c:380:25:380:25 | x | 101 | -| test.c:381:3:381:4 | y3 | 0 | -| test.c:382:3:382:4 | y4 | 0 | -| test.c:383:3:383:4 | y5 | 0 | -| test.c:384:7:384:7 | x | 0 | -| test.c:385:5:385:6 | y3 | 0 | -| test.c:385:11:385:11 | x | 300 | -| test.c:386:5:386:6 | y4 | 0 | -| test.c:386:11:386:11 | x | 300 | -| test.c:387:5:387:6 | y5 | 0 | -| test.c:387:27:387:27 | x | 300 | -| test.c:389:10:389:11 | y1 | 101 | -| test.c:389:15:389:16 | y2 | 101 | -| test.c:389:20:389:21 | y3 | 0 | -| test.c:389:25:389:26 | y4 | 100 | -| test.c:389:30:389:31 | y5 | 0 | -| test.c:394:14:394:14 | m | -Infinity | -| test.c:394:18:394:18 | n | -Infinity | -| test.c:394:22:394:22 | o | -Infinity | -| test.c:394:26:394:26 | p | -Infinity | -| test.c:394:30:394:30 | q | -Infinity | -| test.c:395:14:395:14 | m | -Infinity | -| test.c:395:18:395:18 | n | -Infinity | -| test.c:395:22:395:22 | o | -Infinity | -| test.c:395:26:395:26 | p | -Infinity | -| test.c:395:30:395:30 | q | -Infinity | -| test.c:396:14:396:14 | m | -Infinity | -| test.c:396:18:396:18 | n | -Infinity | -| test.c:396:22:396:22 | o | -Infinity | -| test.c:396:26:396:26 | p | -Infinity | -| test.c:396:30:396:30 | q | -Infinity | -| test.c:397:14:397:14 | m | -Infinity | -| test.c:397:18:397:18 | n | -Infinity | -| test.c:397:22:397:22 | o | -Infinity | -| test.c:397:26:397:26 | p | -Infinity | -| test.c:397:30:397:30 | q | -Infinity | -| test.c:398:14:398:14 | m | -Infinity | -| test.c:398:18:398:18 | n | -Infinity | -| test.c:398:22:398:22 | o | -Infinity | -| test.c:398:26:398:26 | p | -Infinity | -| test.c:398:30:398:30 | q | -Infinity | -| test.c:399:14:399:14 | m | -Infinity | -| test.c:399:18:399:18 | n | -Infinity | -| test.c:399:22:399:22 | o | -Infinity | -| test.c:399:26:399:26 | p | -Infinity | -| test.c:399:30:399:30 | q | -Infinity | -| test.c:400:14:400:14 | m | -Infinity | -| test.c:400:18:400:18 | n | -Infinity | -| test.c:400:22:400:22 | o | -Infinity | -| test.c:400:26:400:26 | p | -Infinity | -| test.c:400:30:400:30 | q | -Infinity | -| test.c:401:14:401:14 | m | -Infinity | -| test.c:401:18:401:18 | n | -Infinity | -| test.c:401:22:401:22 | o | -Infinity | -| test.c:401:26:401:26 | p | -Infinity | -| test.c:401:30:401:30 | q | -Infinity | -| test.c:402:14:402:14 | m | -Infinity | -| test.c:402:18:402:18 | n | -Infinity | -| test.c:402:22:402:22 | o | -Infinity | -| test.c:402:26:402:26 | p | -Infinity | -| test.c:402:30:402:30 | q | -Infinity | -| test.c:403:14:403:14 | m | -Infinity | -| test.c:403:18:403:18 | n | -Infinity | -| test.c:403:22:403:22 | o | -Infinity | -| test.c:403:26:403:26 | p | -Infinity | -| test.c:403:30:403:30 | q | -Infinity | -| test.c:404:14:404:14 | m | -Infinity | -| test.c:404:18:404:18 | n | -Infinity | -| test.c:404:22:404:22 | o | -Infinity | -| test.c:404:26:404:26 | p | -Infinity | -| test.c:404:30:404:30 | q | -Infinity | +| test.c:338:27:338:27 | e | 0 | +| test.c:338:40:338:40 | e | 0 | +| test.c:339:25:339:25 | e | 0 | +| test.c:339:39:339:39 | e | 0 | +| test.c:340:27:340:27 | e | 0 | +| test.c:340:40:340:40 | e | 0 | +| test.c:341:27:341:27 | e | 0 | +| test.c:341:40:341:40 | e | 0 | +| test.c:342:27:342:27 | e | 0 | +| test.c:342:41:342:41 | e | 8 | +| test.c:344:10:344:12 | bi1 | 0 | +| test.c:344:16:344:18 | bi2 | 0 | +| test.c:344:22:344:24 | bi3 | 0 | +| test.c:344:28:344:30 | bi4 | 0 | +| test.c:344:34:344:36 | bi5 | 2 | +| test.c:349:7:349:7 | x | -2147483648 | +| test.c:353:10:353:10 | i | 0 | +| test.c:354:5:354:5 | i | 0 | +| test.c:356:3:356:3 | d | -2147483648 | +| test.c:356:7:356:7 | i | 3 | +| test.c:357:7:357:7 | x | 0 | +| test.c:358:9:358:9 | d | 3 | +| test.c:358:14:358:14 | x | 0 | +| test.c:368:3:368:4 | y1 | 0 | +| test.c:368:8:368:8 | x | 0 | +| test.c:368:18:368:18 | x | 0 | +| test.c:369:3:369:4 | y2 | 0 | +| test.c:369:8:369:8 | x | 0 | +| test.c:369:24:369:24 | x | 0 | +| test.c:370:3:370:4 | y3 | 0 | +| test.c:371:3:371:4 | y4 | 0 | +| test.c:372:3:372:4 | y5 | 0 | +| test.c:373:3:373:4 | y6 | 0 | +| test.c:374:3:374:4 | y7 | 0 | +| test.c:375:3:375:4 | y8 | 0 | +| test.c:376:7:376:7 | x | 0 | +| test.c:377:5:377:6 | y3 | 0 | +| test.c:377:10:377:10 | x | 0 | +| test.c:378:5:378:6 | y4 | 0 | +| test.c:378:10:378:10 | x | 0 | +| test.c:379:5:379:6 | y5 | 0 | +| test.c:379:11:379:11 | x | 0 | +| test.c:380:5:380:6 | y6 | 0 | +| test.c:380:27:380:27 | x | 0 | +| test.c:381:5:381:6 | y7 | 0 | +| test.c:381:27:381:27 | x | 0 | +| test.c:382:5:382:6 | y8 | 0 | +| test.c:382:28:382:28 | x | 0 | +| test.c:384:10:384:11 | y1 | 0 | +| test.c:384:15:384:16 | y2 | 0 | +| test.c:384:20:384:21 | y3 | 0 | +| test.c:384:25:384:26 | y4 | 0 | +| test.c:384:30:384:31 | y5 | 0 | +| test.c:384:35:384:36 | y6 | 0 | +| test.c:384:40:384:41 | y7 | 0 | +| test.c:384:45:384:46 | y8 | 0 | +| test.c:390:3:390:4 | y1 | 0 | +| test.c:390:8:390:8 | x | 0 | +| test.c:390:18:390:18 | x | 101 | +| test.c:391:3:391:4 | y2 | 0 | +| test.c:391:8:391:8 | x | 0 | +| test.c:391:25:391:25 | x | 101 | +| test.c:392:3:392:4 | y3 | 0 | +| test.c:393:3:393:4 | y4 | 0 | +| test.c:394:3:394:4 | y5 | 0 | +| test.c:395:7:395:7 | x | 0 | +| test.c:396:5:396:6 | y3 | 0 | +| test.c:396:11:396:11 | x | 300 | +| test.c:397:5:397:6 | y4 | 0 | +| test.c:397:11:397:11 | x | 300 | +| test.c:398:5:398:6 | y5 | 0 | +| test.c:398:27:398:27 | x | 300 | +| test.c:400:10:400:11 | y1 | 101 | +| test.c:400:15:400:16 | y2 | 101 | +| test.c:400:20:400:21 | y3 | 0 | +| test.c:400:25:400:26 | y4 | 100 | +| test.c:400:30:400:31 | y5 | 0 | | test.c:405:14:405:14 | m | -Infinity | | test.c:405:18:405:18 | n | -Infinity | | test.c:405:22:405:22 | o | -Infinity | | test.c:405:26:405:26 | p | -Infinity | | test.c:405:30:405:30 | q | -Infinity | -| test.c:411:19:411:19 | a | 0.143339 | -| test.c:411:23:411:23 | b | 0.222479 | -| test.c:411:27:411:27 | c | 0.051213 | -| test.c:411:31:411:31 | d | 0.369769 | -| test.c:411:35:411:35 | e | 0.105977 | -| test.c:411:39:411:39 | f | 0.107867 | -| test.c:411:43:411:43 | g | 0.025243 | -| test.c:411:47:411:47 | h | 0.149635 | -| test.c:411:51:411:51 | i | 0.053282 | -| test.c:411:55:411:55 | j | 0.276432 | -| test.c:411:59:411:59 | k | 0.205191 | -| test.c:411:63:411:63 | l | 0.132041 | -| test.c:413:10:413:15 | output | 1.842468 | -| test.c:418:20:418:20 | x | 0 | -| test.c:418:30:418:30 | x | 0 | -| test.c:421:3:421:4 | y1 | 0 | -| test.c:421:11:421:11 | y | 0 | -| test.c:421:14:421:14 | y | 1 | -| test.c:422:3:422:4 | y2 | 0 | -| test.c:422:9:422:9 | y | 1 | -| test.c:422:14:422:14 | y | 2 | -| test.c:422:22:422:22 | y | 5 | -| test.c:423:10:423:11 | y1 | 1 | -| test.c:423:15:423:16 | y2 | 5 | -| test.c:431:3:431:3 | i | -2147483648 | -| test.c:432:7:432:7 | i | 10 | -| test.c:434:3:434:3 | i | -2147483648 | -| test.c:435:3:435:3 | i | 10 | -| test.c:436:7:436:7 | i | 20 | -| test.c:438:3:438:3 | i | -2147483648 | -| test.c:439:3:439:3 | i | 40 | -| test.c:440:7:440:7 | i | 30 | +| test.c:406:14:406:14 | m | -Infinity | +| test.c:406:18:406:18 | n | -Infinity | +| test.c:406:22:406:22 | o | -Infinity | +| test.c:406:26:406:26 | p | -Infinity | +| test.c:406:30:406:30 | q | -Infinity | +| test.c:407:14:407:14 | m | -Infinity | +| test.c:407:18:407:18 | n | -Infinity | +| test.c:407:22:407:22 | o | -Infinity | +| test.c:407:26:407:26 | p | -Infinity | +| test.c:407:30:407:30 | q | -Infinity | +| test.c:408:14:408:14 | m | -Infinity | +| test.c:408:18:408:18 | n | -Infinity | +| test.c:408:22:408:22 | o | -Infinity | +| test.c:408:26:408:26 | p | -Infinity | +| test.c:408:30:408:30 | q | -Infinity | +| test.c:409:14:409:14 | m | -Infinity | +| test.c:409:18:409:18 | n | -Infinity | +| test.c:409:22:409:22 | o | -Infinity | +| test.c:409:26:409:26 | p | -Infinity | +| test.c:409:30:409:30 | q | -Infinity | +| test.c:410:14:410:14 | m | -Infinity | +| test.c:410:18:410:18 | n | -Infinity | +| test.c:410:22:410:22 | o | -Infinity | +| test.c:410:26:410:26 | p | -Infinity | +| test.c:410:30:410:30 | q | -Infinity | +| test.c:411:14:411:14 | m | -Infinity | +| test.c:411:18:411:18 | n | -Infinity | +| test.c:411:22:411:22 | o | -Infinity | +| test.c:411:26:411:26 | p | -Infinity | +| test.c:411:30:411:30 | q | -Infinity | +| test.c:412:14:412:14 | m | -Infinity | +| test.c:412:18:412:18 | n | -Infinity | +| test.c:412:22:412:22 | o | -Infinity | +| test.c:412:26:412:26 | p | -Infinity | +| test.c:412:30:412:30 | q | -Infinity | +| test.c:413:14:413:14 | m | -Infinity | +| test.c:413:18:413:18 | n | -Infinity | +| test.c:413:22:413:22 | o | -Infinity | +| test.c:413:26:413:26 | p | -Infinity | +| test.c:413:30:413:30 | q | -Infinity | +| test.c:414:14:414:14 | m | -Infinity | +| test.c:414:18:414:18 | n | -Infinity | +| test.c:414:22:414:22 | o | -Infinity | +| test.c:414:26:414:26 | p | -Infinity | +| test.c:414:30:414:30 | q | -Infinity | +| test.c:415:14:415:14 | m | -Infinity | +| test.c:415:18:415:18 | n | -Infinity | +| test.c:415:22:415:22 | o | -Infinity | +| test.c:415:26:415:26 | p | -Infinity | +| test.c:415:30:415:30 | q | -Infinity | +| test.c:416:14:416:14 | m | -Infinity | +| test.c:416:18:416:18 | n | -Infinity | +| test.c:416:22:416:22 | o | -Infinity | +| test.c:416:26:416:26 | p | -Infinity | +| test.c:416:30:416:30 | q | -Infinity | +| test.c:422:19:422:19 | a | 0.143339 | +| test.c:422:23:422:23 | b | 0.222479 | +| test.c:422:27:422:27 | c | 0.051213 | +| test.c:422:31:422:31 | d | 0.369769 | +| test.c:422:35:422:35 | e | 0.105977 | +| test.c:422:39:422:39 | f | 0.107867 | +| test.c:422:43:422:43 | g | 0.025243 | +| test.c:422:47:422:47 | h | 0.149635 | +| test.c:422:51:422:51 | i | 0.053282 | +| test.c:422:55:422:55 | j | 0.276432 | +| test.c:422:59:422:59 | k | 0.205191 | +| test.c:422:63:422:63 | l | 0.132041 | +| test.c:424:10:424:15 | output | 1.842468 | +| test.c:429:20:429:20 | x | 0 | +| test.c:429:30:429:30 | x | 0 | +| test.c:432:3:432:4 | y1 | 0 | +| test.c:432:11:432:11 | y | 0 | +| test.c:432:14:432:14 | y | 1 | +| test.c:433:3:433:4 | y2 | 0 | +| test.c:433:9:433:9 | y | 1 | +| test.c:433:14:433:14 | y | 2 | +| test.c:433:22:433:22 | y | 5 | +| test.c:434:10:434:11 | y1 | 1 | +| test.c:434:15:434:16 | y2 | 5 | | test.c:442:3:442:3 | i | -2147483648 | -| test.c:442:7:442:7 | j | -2147483648 | -| test.c:443:7:443:7 | i | 40 | +| test.c:443:7:443:7 | i | 10 | | test.c:445:3:445:3 | i | -2147483648 | -| test.c:445:8:445:8 | j | 40 | -| test.c:446:7:446:7 | i | 50 | -| test.c:448:3:448:3 | i | -2147483648 | -| test.c:448:13:448:13 | j | 50 | -| test.c:449:7:449:7 | i | 60 | -| test.c:456:12:456:12 | a | 0 | -| test.c:456:17:456:17 | a | 3 | -| test.c:456:33:456:33 | b | 0 | -| test.c:456:38:456:38 | b | 5 | -| test.c:457:13:457:13 | a | 3 | -| test.c:457:15:457:15 | b | 5 | -| test.c:458:5:458:9 | total | 0 | -| test.c:458:14:458:14 | r | 15 | -| test.c:460:12:460:12 | a | 0 | -| test.c:460:17:460:17 | a | 3 | -| test.c:460:33:460:33 | b | 0 | -| test.c:460:38:460:38 | b | 0 | -| test.c:461:13:461:13 | a | 3 | -| test.c:461:15:461:15 | b | 0 | -| test.c:462:5:462:9 | total | 0 | -| test.c:462:14:462:14 | r | 0 | -| test.c:464:12:464:12 | a | 0 | -| test.c:464:17:464:17 | a | 3 | -| test.c:464:34:464:34 | b | 0 | -| test.c:464:39:464:39 | b | 13 | -| test.c:465:13:465:13 | a | 3 | -| test.c:465:15:465:15 | b | 13 | -| test.c:466:5:466:9 | total | 0 | -| test.c:466:14:466:14 | r | 39 | -| test.c:469:10:469:14 | total | 0 | -| test.c:475:12:475:12 | b | 0 | -| test.c:475:17:475:17 | b | 5 | -| test.c:476:16:476:16 | b | 5 | +| test.c:446:3:446:3 | i | 10 | +| test.c:447:7:447:7 | i | 20 | +| test.c:449:3:449:3 | i | -2147483648 | +| test.c:450:3:450:3 | i | 40 | +| test.c:451:7:451:7 | i | 30 | +| test.c:453:3:453:3 | i | -2147483648 | +| test.c:453:7:453:7 | j | -2147483648 | +| test.c:454:7:454:7 | i | 40 | +| test.c:456:3:456:3 | i | -2147483648 | +| test.c:456:8:456:8 | j | 40 | +| test.c:457:7:457:7 | i | 50 | +| test.c:459:3:459:3 | i | -2147483648 | +| test.c:459:13:459:13 | j | 50 | +| test.c:460:7:460:7 | i | 60 | +| test.c:467:12:467:12 | a | 0 | +| test.c:467:17:467:17 | a | 3 | +| test.c:467:33:467:33 | b | 0 | +| test.c:467:38:467:38 | b | 5 | +| test.c:468:13:468:13 | a | 3 | +| test.c:468:15:468:15 | b | 5 | +| test.c:469:5:469:9 | total | 0 | +| test.c:469:14:469:14 | r | 15 | +| test.c:471:12:471:12 | a | 0 | +| test.c:471:17:471:17 | a | 3 | +| test.c:471:33:471:33 | b | 0 | +| test.c:471:38:471:38 | b | 0 | +| test.c:472:13:472:13 | a | 3 | +| test.c:472:15:472:15 | b | 0 | +| test.c:473:5:473:9 | total | 0 | +| test.c:473:14:473:14 | r | 0 | +| test.c:475:12:475:12 | a | 0 | +| test.c:475:17:475:17 | a | 3 | +| test.c:475:34:475:34 | b | 0 | +| test.c:475:39:475:39 | b | 13 | +| test.c:476:13:476:13 | a | 3 | +| test.c:476:15:476:15 | b | 13 | | test.c:477:5:477:9 | total | 0 | -| test.c:477:14:477:14 | r | 55 | -| test.c:479:12:479:12 | b | 0 | -| test.c:479:17:479:17 | b | 0 | -| test.c:480:16:480:16 | b | 0 | -| test.c:481:5:481:9 | total | 0 | -| test.c:481:14:481:14 | r | 0 | -| test.c:483:13:483:13 | b | 0 | -| test.c:483:18:483:18 | b | 13 | -| test.c:484:16:484:16 | b | 13 | -| test.c:485:5:485:9 | total | 0 | -| test.c:485:14:485:14 | r | 143 | -| test.c:488:10:488:14 | total | 0 | -| test.c:493:3:493:3 | x | 0 | -| test.c:493:7:493:7 | y | 0 | -| test.c:494:3:494:4 | xy | 0 | -| test.c:494:8:494:8 | x | 1000000003 | -| test.c:494:12:494:12 | y | 1000000003 | -| test.c:495:10:495:11 | xy | 1000000006000000000 | -| test.c:500:3:500:3 | x | 0 | -| test.c:501:3:501:3 | y | 0 | -| test.c:502:3:502:4 | xy | 0 | -| test.c:502:8:502:8 | x | 274177 | -| test.c:502:12:502:12 | y | 67280421310721 | -| test.c:503:10:503:11 | xy | 18446744073709551616 | -| test.c:507:7:507:8 | ui | 0 | -| test.c:508:43:508:44 | ui | 10 | -| test.c:508:48:508:49 | ui | 10 | -| test.c:509:12:509:17 | result | 100 | -| test.c:511:7:511:8 | ul | 0 | -| test.c:512:28:512:29 | ul | 10 | -| test.c:512:33:512:34 | ul | 10 | -| test.c:513:12:513:17 | result | 0 | -| test.c:519:7:519:8 | ui | 0 | -| test.c:519:19:519:20 | ui | 0 | -| test.c:520:5:520:6 | ui | 2 | -| test.c:520:11:520:12 | ui | 2 | -| test.c:521:12:521:13 | ui | 4 | -| test.c:525:3:525:9 | uiconst | 10 | -| test.c:528:3:528:9 | ulconst | 10 | -| test.c:529:10:529:16 | uiconst | 40 | -| test.c:529:20:529:26 | ulconst | 40 | -| test.c:533:7:533:7 | i | -2147483648 | -| test.c:533:18:533:18 | i | -1 | -| test.c:534:5:534:5 | i | -2147483648 | -| test.c:534:13:534:13 | i | -1 | -| test.c:535:9:535:9 | i | -5 | -| test.c:537:5:537:5 | i | -2147483648 | -| test.c:537:9:537:9 | i | -5 | -| test.c:538:9:538:9 | i | -30 | -| test.c:540:5:540:5 | i | -30 | -| test.c:541:9:541:9 | i | -210 | -| test.c:543:5:543:5 | i | -210 | -| test.c:544:9:544:9 | i | -1155 | -| test.c:546:7:546:7 | i | -2147483648 | -| test.c:547:5:547:5 | i | -2147483648 | -| test.c:547:9:547:9 | i | -1 | -| test.c:548:9:548:9 | i | 1 | -| test.c:550:3:550:3 | i | -2147483648 | -| test.c:550:7:550:7 | i | -2147483648 | -| test.c:551:10:551:10 | i | -2147483648 | -| test.c:554:3:554:3 | i | -2147483648 | -| test.c:554:10:554:11 | sc | 1 | -| test.c:556:7:556:7 | i | -128 | -| test.c:563:7:563:7 | n | 0 | -| test.c:565:7:565:7 | n | 0 | -| test.c:566:9:566:9 | n | 1 | -| test.c:569:7:569:7 | n | 0 | -| test.c:570:9:570:9 | n | 1 | -| test.c:572:9:572:9 | n | 0 | -| test.c:575:8:575:8 | n | 0 | -| test.c:576:9:576:9 | n | 0 | -| test.c:578:9:578:9 | n | 1 | -| test.c:581:10:581:10 | n | 0 | -| test.c:582:5:582:5 | n | 1 | -| test.c:585:7:585:7 | n | 0 | -| test.c:589:7:589:7 | n | -32768 | -| test.c:592:7:592:7 | n | 0 | -| test.c:593:9:593:9 | n | 0 | -| test.c:595:9:595:9 | n | 1 | -| test.c:598:7:598:7 | n | 0 | -| test.c:599:9:599:9 | n | 1 | -| test.c:601:9:601:9 | n | 0 | -| test.c:604:10:604:10 | n | 0 | -| test.c:605:5:605:5 | n | 1 | -| test.c:608:7:608:7 | n | 0 | -| test.c:612:7:612:7 | n | -32768 | -| test.c:613:9:613:9 | n | -32768 | -| test.c:614:11:614:11 | n | 0 | -| test.c:618:7:618:7 | n | -32768 | -| test.c:619:13:619:13 | n | 5 | -| test.c:622:9:622:9 | n | 6 | -| test.c:625:7:625:7 | n | -32768 | -| test.c:625:22:625:22 | n | -32767 | -| test.c:626:9:626:9 | n | -32766 | +| test.c:477:14:477:14 | r | 39 | +| test.c:480:10:480:14 | total | 0 | +| test.c:486:12:486:12 | b | 0 | +| test.c:486:17:486:17 | b | 5 | +| test.c:487:16:487:16 | b | 5 | +| test.c:488:5:488:9 | total | 0 | +| test.c:488:14:488:14 | r | 55 | +| test.c:490:12:490:12 | b | 0 | +| test.c:490:17:490:17 | b | 0 | +| test.c:491:16:491:16 | b | 0 | +| test.c:492:5:492:9 | total | 0 | +| test.c:492:14:492:14 | r | 0 | +| test.c:494:13:494:13 | b | 0 | +| test.c:494:18:494:18 | b | 13 | +| test.c:495:16:495:16 | b | 13 | +| test.c:496:5:496:9 | total | 0 | +| test.c:496:14:496:14 | r | 143 | +| test.c:499:10:499:14 | total | 0 | +| test.c:504:3:504:3 | x | 0 | +| test.c:504:7:504:7 | y | 0 | +| test.c:505:3:505:4 | xy | 0 | +| test.c:505:8:505:8 | x | 1000000003 | +| test.c:505:12:505:12 | y | 1000000003 | +| test.c:506:10:506:11 | xy | 1000000006000000000 | +| test.c:511:3:511:3 | x | 0 | +| test.c:512:3:512:3 | y | 0 | +| test.c:513:3:513:4 | xy | 0 | +| test.c:513:8:513:8 | x | 274177 | +| test.c:513:12:513:12 | y | 67280421310721 | +| test.c:514:10:514:11 | xy | 18446744073709551616 | +| test.c:518:7:518:8 | ui | 0 | +| test.c:519:43:519:44 | ui | 10 | +| test.c:519:48:519:49 | ui | 10 | +| test.c:520:12:520:17 | result | 100 | +| test.c:522:7:522:8 | ul | 0 | +| test.c:523:28:523:29 | ul | 10 | +| test.c:523:33:523:34 | ul | 10 | +| test.c:524:12:524:17 | result | 0 | +| test.c:530:7:530:8 | ui | 0 | +| test.c:530:19:530:20 | ui | 0 | +| test.c:531:5:531:6 | ui | 2 | +| test.c:531:11:531:12 | ui | 2 | +| test.c:532:12:532:13 | ui | 4 | +| test.c:536:3:536:9 | uiconst | 10 | +| test.c:539:3:539:9 | ulconst | 10 | +| test.c:540:10:540:16 | uiconst | 40 | +| test.c:540:20:540:26 | ulconst | 40 | +| test.c:544:7:544:7 | i | -2147483648 | +| test.c:544:18:544:18 | i | -1 | +| test.c:545:5:545:5 | i | -2147483648 | +| test.c:545:13:545:13 | i | -1 | +| test.c:546:9:546:9 | i | -5 | +| test.c:548:5:548:5 | i | -2147483648 | +| test.c:548:9:548:9 | i | -5 | +| test.c:549:9:549:9 | i | -30 | +| test.c:551:5:551:5 | i | -30 | +| test.c:552:9:552:9 | i | -210 | +| test.c:554:5:554:5 | i | -210 | +| test.c:555:9:555:9 | i | -1155 | +| test.c:557:7:557:7 | i | -2147483648 | +| test.c:558:5:558:5 | i | -2147483648 | +| test.c:558:9:558:9 | i | -1 | +| test.c:559:9:559:9 | i | 1 | +| test.c:561:3:561:3 | i | -2147483648 | +| test.c:561:7:561:7 | i | -2147483648 | +| test.c:562:10:562:10 | i | -2147483648 | +| test.c:565:3:565:3 | i | -2147483648 | +| test.c:565:10:565:11 | sc | 1 | +| test.c:567:7:567:7 | i | -128 | +| test.c:574:7:574:7 | n | 0 | +| test.c:576:7:576:7 | n | 0 | +| test.c:577:9:577:9 | n | 1 | +| test.c:580:7:580:7 | n | 0 | +| test.c:581:9:581:9 | n | 1 | +| test.c:583:9:583:9 | n | 0 | +| test.c:586:8:586:8 | n | 0 | +| test.c:587:9:587:9 | n | 0 | +| test.c:589:9:589:9 | n | 1 | +| test.c:592:10:592:10 | n | 0 | +| test.c:593:5:593:5 | n | 1 | +| test.c:596:7:596:7 | n | 0 | +| test.c:600:7:600:7 | n | -32768 | +| test.c:603:7:603:7 | n | 0 | +| test.c:604:9:604:9 | n | 0 | +| test.c:606:9:606:9 | n | 1 | +| test.c:609:7:609:7 | n | 0 | +| test.c:610:9:610:9 | n | 1 | +| test.c:612:9:612:9 | n | 0 | +| test.c:615:10:615:10 | n | 0 | +| test.c:616:5:616:5 | n | 1 | +| test.c:619:7:619:7 | n | 0 | +| test.c:623:7:623:7 | n | -32768 | +| test.c:624:9:624:9 | n | -32768 | +| test.c:625:11:625:11 | n | 0 | | test.c:629:7:629:7 | n | -32768 | -| test.c:630:5:630:5 | n | 0 | -| test.c:630:10:630:10 | n | 1 | -| test.c:630:14:630:14 | n | 0 | -| test.c:631:6:631:6 | n | 0 | -| test.c:631:10:631:10 | n | 0 | -| test.c:631:14:631:14 | n | 1 | -| test.c:642:7:642:8 | ss | -32768 | -| test.c:643:9:643:10 | ss | 0 | -| test.c:646:7:646:8 | ss | -32768 | -| test.c:647:9:647:10 | ss | -32768 | -| test.c:650:14:650:15 | us | 0 | -| test.c:651:9:651:10 | us | 0 | -| test.c:654:14:654:15 | us | 0 | -| test.c:655:9:655:10 | us | 0 | -| test.c:658:7:658:8 | ss | -32768 | -| test.c:659:9:659:10 | ss | -32768 | -| test.c:662:7:662:8 | ss | -32768 | -| test.c:663:9:663:10 | ss | -1 | -| test.c:669:8:669:8 | s | -2147483648 | -| test.c:669:15:669:15 | s | 0 | -| test.c:669:23:669:23 | s | 0 | -| test.c:670:18:670:18 | s | 0 | -| test.c:670:22:670:22 | s | 0 | -| test.c:671:9:671:14 | result | 0 | -| test.c:677:7:677:7 | i | 0 | -| test.c:678:9:678:9 | i | -2147483648 | -| test.c:682:7:682:7 | u | 0 | -| test.c:683:9:683:9 | u | 0 | -| test.c:688:12:688:12 | s | -2147483648 | -| test.c:689:7:689:8 | s2 | -4 | -| test.c:694:7:694:7 | x | -2147483648 | -| test.c:695:9:695:9 | y | -2147483648 | -| test.c:699:7:699:7 | y | -2147483648 | -| test.c:708:7:708:7 | x | -2147483648 | -| test.c:713:7:713:7 | x | -2147483648 | -| test.c:720:8:720:8 | x | 2147483647 | -| test.c:720:12:720:12 | y | 256 | -| test.c:721:9:721:9 | x | 2147483647 | -| test.c:722:9:722:9 | y | 256 | +| test.c:630:13:630:13 | n | 5 | +| test.c:633:9:633:9 | n | 6 | +| test.c:636:7:636:7 | n | -32768 | +| test.c:636:22:636:22 | n | -32767 | +| test.c:637:9:637:9 | n | -32766 | +| test.c:640:7:640:7 | n | -32768 | +| test.c:641:5:641:5 | n | 0 | +| test.c:641:10:641:10 | n | 1 | +| test.c:641:14:641:14 | n | 0 | +| test.c:642:6:642:6 | n | 0 | +| test.c:642:10:642:10 | n | 0 | +| test.c:642:14:642:14 | n | 1 | +| test.c:653:7:653:8 | ss | -32768 | +| test.c:654:9:654:10 | ss | 0 | +| test.c:657:7:657:8 | ss | -32768 | +| test.c:658:9:658:10 | ss | -32768 | +| test.c:661:14:661:15 | us | 0 | +| test.c:662:9:662:10 | us | 0 | +| test.c:665:14:665:15 | us | 0 | +| test.c:666:9:666:10 | us | 0 | +| test.c:669:7:669:8 | ss | -32768 | +| test.c:670:9:670:10 | ss | -32768 | +| test.c:673:7:673:8 | ss | -32768 | +| test.c:674:9:674:10 | ss | -1 | +| test.c:680:8:680:8 | s | -2147483648 | +| test.c:680:15:680:15 | s | 0 | +| test.c:680:23:680:23 | s | 0 | +| test.c:681:18:681:18 | s | 0 | +| test.c:681:22:681:22 | s | 0 | +| test.c:682:9:682:14 | result | 0 | +| test.c:688:7:688:7 | i | 0 | +| test.c:689:9:689:9 | i | -2147483648 | +| test.c:693:7:693:7 | u | 0 | +| test.c:694:9:694:9 | u | 0 | +| test.c:699:12:699:12 | s | -2147483648 | +| test.c:700:7:700:8 | s2 | -4 | +| test.c:705:7:705:7 | x | -2147483648 | +| test.c:706:9:706:9 | y | -2147483648 | +| test.c:710:7:710:7 | y | -2147483648 | +| test.c:719:7:719:7 | x | -2147483648 | +| test.c:724:7:724:7 | x | -2147483648 | +| test.c:731:8:731:8 | x | 2147483647 | +| test.c:731:12:731:12 | y | 256 | +| test.c:732:9:732:9 | x | 2147483647 | +| test.c:733:9:733:9 | y | 256 | | test.cpp:10:7:10:7 | b | -2147483648 | | test.cpp:11:5:11:5 | x | -2147483648 | | test.cpp:13:10:13:10 | x | -2147483648 | diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryLower.expected b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryLower.expected index 0cd2437e0730..6b4c08483ca0 100644 --- a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryLower.expected +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryLower.expected @@ -1,79 +1,84 @@ | test.c:154:10:154:40 | ... ? ... : ... | -1.0 | 1.0 | -1.0 | -| test.c:357:8:357:23 | ... ? ... : ... | 0.0 | 0.0 | 10.0 | -| test.c:358:8:358:24 | ... ? ... : ... | 0.0 | 10.0 | 0.0 | -| test.c:366:10:366:15 | ... ? ... : ... | 0.0 | 0.0 | 5.0 | -| test.c:367:10:367:17 | ... ? ... : ... | 0.0 | 0.0 | 500.0 | -| test.c:368:10:368:21 | ... ? ... : ... | 1.0 | 1.0 | 500.0 | -| test.c:369:10:369:36 | ... ? ... : ... | 0.0 | 1.0 | 5.0 | -| test.c:370:10:370:38 | ... ? ... : ... | 0.0 | 1.0 | 500.0 | -| test.c:371:10:371:39 | ... ? ... : ... | 1.0 | 1.0 | 500.0 | -| test.c:379:8:379:24 | ... ? ... : ... | 101.0 | 101.0 | 110.0 | -| test.c:380:8:380:25 | ... ? ... : ... | 101.0 | 110.0 | 101.0 | -| test.c:385:10:385:21 | ... ? ... : ... | 0.0 | 0.0 | 5.0 | -| test.c:386:10:386:21 | ... ? ... : ... | 100.0 | 100.0 | 5.0 | -| test.c:387:10:387:38 | ... ? ... : ... | 0.0 | 100.0 | 5.0 | -| test.c:394:14:394:108 | ... ? ... : ... | 0.14333887 | 0.14333887 | 0.40496805 | -| test.c:394:18:394:95 | ... ? ... : ... | 0.14333887 | 0.14333887 | 0.21540225 | -| test.c:394:22:394:82 | ... ? ... : ... | 0.14333887 | 0.14333887 | 0.39206458 | -| test.c:394:26:394:69 | ... ? ... : ... | 0.14333887 | 0.14333887 | 0.35279203 | -| test.c:394:30:394:56 | ... ? ... : ... | 0.14333887 | 0.47438827 | 0.14333887 | -| test.c:395:14:395:108 | ... ? ... : ... | 0.22247853 | 0.22247853 | 0.5297741 | -| test.c:395:18:395:95 | ... ? ... : ... | 0.22247853 | 0.22247853 | 0.59270465 | -| test.c:395:22:395:82 | ... ? ... : ... | 0.22247853 | 0.22247853 | 0.32661893 | -| test.c:395:26:395:69 | ... ? ... : ... | 0.22247853 | 0.34183348 | 0.22247853 | -| test.c:395:30:395:56 | ... ? ... : ... | 0.34183348 | 0.34183348 | 0.3533464 | -| test.c:396:14:396:108 | ... ? ... : ... | 0.05121256 | 0.05121256 | 0.67981451 | -| test.c:396:18:396:95 | ... ? ... : ... | 0.05121256 | 0.05121256 | 0.79310745 | -| test.c:396:22:396:82 | ... ? ... : ... | 0.05121256 | 0.31235514 | 0.05121256 | -| test.c:396:26:396:69 | ... ? ... : ... | 0.31235514 | 0.31478084 | 0.31235514 | -| test.c:396:30:396:56 | ... ? ... : ... | 0.31478084 | 0.77429603 | 0.31478084 | -| test.c:397:14:397:108 | ... ? ... : ... | 0.36976948 | 0.36976948 | 0.83866835 | -| test.c:397:18:397:95 | ... ? ... : ... | 0.36976948 | 0.44729556 | 0.36976948 | -| test.c:397:22:397:82 | ... ? ... : ... | 0.44729556 | 0.44729556 | 0.59952732 | -| test.c:397:26:397:69 | ... ? ... : ... | 0.44729556 | 0.44729556 | 0.98997262 | -| test.c:397:30:397:56 | ... ? ... : ... | 0.44729556 | 0.44729556 | 0.80599202 | -| test.c:398:14:398:108 | ... ? ... : ... | 0.10597712 | 0.10597712 | 0.68734874 | -| test.c:398:18:398:95 | ... ? ... : ... | 0.10597712 | 0.10597712 | 0.72485966 | -| test.c:398:22:398:82 | ... ? ... : ... | 0.10597712 | 0.10597712 | 0.21778426 | -| test.c:398:26:398:69 | ... ? ... : ... | 0.10597712 | 0.49311828 | 0.10597712 | -| test.c:398:30:398:56 | ... ? ... : ... | 0.49311828 | 0.49311828 | 0.90389911 | -| test.c:399:14:399:108 | ... ? ... : ... | 0.1078665 | 0.1078665 | 0.58440865 | -| test.c:399:18:399:95 | ... ? ... : ... | 0.1078665 | 0.1078665 | 0.34808892 | -| test.c:399:22:399:82 | ... ? ... : ... | 0.1078665 | 0.1078665 | 0.76164052 | -| test.c:399:26:399:69 | ... ? ... : ... | 0.1078665 | 0.1078665 | 0.11884576 | -| test.c:399:30:399:56 | ... ? ... : ... | 0.1078665 | 0.47452848 | 0.1078665 | -| test.c:400:14:400:108 | ... ? ... : ... | 0.02524326 | 0.02524326 | 0.36232384 | -| test.c:400:18:400:95 | ... ? ... : ... | 0.02524326 | 0.02524326 | 0.85235179 | -| test.c:400:22:400:82 | ... ? ... : ... | 0.02524326 | 0.02524326 | 0.12516558 | -| test.c:400:26:400:69 | ... ? ... : ... | 0.02524326 | 0.02524326 | 0.95823075 | -| test.c:400:30:400:56 | ... ? ... : ... | 0.02524326 | 0.02524326 | 0.82905046 | -| test.c:401:14:401:108 | ... ? ... : ... | 0.14963485 | 0.14963485 | 0.84331272 | -| test.c:401:18:401:95 | ... ? ... : ... | 0.14963485 | 0.14963485 | 0.48640909 | -| test.c:401:22:401:82 | ... ? ... : ... | 0.14963485 | 0.14963485 | 0.45041108 | -| test.c:401:26:401:69 | ... ? ... : ... | 0.14963485 | 0.32876044 | 0.14963485 | -| test.c:401:30:401:56 | ... ? ... : ... | 0.32876044 | 0.38708626 | 0.32876044 | -| test.c:402:14:402:108 | ... ? ... : ... | 0.05328182 | 0.14800508 | 0.05328182 | -| test.c:402:18:402:95 | ... ? ... : ... | 0.14800508 | 0.14800508 | 0.37428143 | -| test.c:402:22:402:82 | ... ? ... : ... | 0.14800508 | 0.15755063 | 0.14800508 | -| test.c:402:26:402:69 | ... ? ... : ... | 0.15755063 | 0.15755063 | 0.26428481 | -| test.c:402:30:402:56 | ... ? ... : ... | 0.15755063 | 0.15755063 | 0.77086833 | -| test.c:403:14:403:108 | ... ? ... : ... | 0.27643238 | 0.27643238 | 0.69072144 | -| test.c:403:18:403:95 | ... ? ... : ... | 0.27643238 | 0.27643238 | 0.39468857 | -| test.c:403:22:403:82 | ... ? ... : ... | 0.27643238 | 0.27643238 | 0.55679274 | -| test.c:403:26:403:69 | ... ? ... : ... | 0.27643238 | 0.41736536 | 0.27643238 | -| test.c:403:30:403:56 | ... ? ... : ... | 0.41736536 | 0.41736536 | 0.76826628 | -| test.c:404:14:404:108 | ... ? ... : ... | 0.2051911 | 0.2051911 | 0.81372798 | -| test.c:404:18:404:95 | ... ? ... : ... | 0.2051911 | 0.2051911 | 0.88745559 | -| test.c:404:22:404:82 | ... ? ... : ... | 0.2051911 | 0.29904824 | 0.2051911 | -| test.c:404:26:404:69 | ... ? ... : ... | 0.29904824 | 0.29904824 | 0.76242583 | -| test.c:404:30:404:56 | ... ? ... : ... | 0.29904824 | 0.88955345 | 0.29904824 | -| test.c:405:14:405:108 | ... ? ... : ... | 0.13204114 | 0.13204114 | 0.42762647 | -| test.c:405:18:405:95 | ... ? ... : ... | 0.13204114 | 0.13204114 | 0.52031241 | -| test.c:405:22:405:82 | ... ? ... : ... | 0.13204114 | 0.42186276 | 0.13204114 | -| test.c:405:26:405:69 | ... ? ... : ... | 0.42186276 | 0.42186276 | 0.44996679 | -| test.c:405:30:405:56 | ... ? ... : ... | 0.42186276 | 0.42186276 | 0.53843358 | -| test.c:418:20:418:36 | ... ? ... : ... | 0.0 | 0.0 | 100.0 | -| test.c:630:5:630:14 | ... ? ... : ... | 0.0 | 1.0 | 0.0 | -| test.c:631:5:631:14 | ... ? ... : ... | 0.0 | 0.0 | 1.0 | +| test.c:338:22:338:44 | ... ? ... : ... | 0.0 | 0.0 | 2.0 | +| test.c:339:20:339:43 | ... ? ... : ... | 0.0 | 0.0 | 2.0 | +| test.c:340:22:340:44 | ... ? ... : ... | 0.0 | 0.0 | 2.0 | +| test.c:341:22:341:44 | ... ? ... : ... | 0.0 | 0.0 | 2.0 | +| test.c:342:22:342:45 | ... ? ... : ... | 2.0 | 8.0 | 2.0 | +| test.c:368:8:368:23 | ... ? ... : ... | 0.0 | 0.0 | 10.0 | +| test.c:369:8:369:24 | ... ? ... : ... | 0.0 | 10.0 | 0.0 | +| test.c:377:10:377:15 | ... ? ... : ... | 0.0 | 0.0 | 5.0 | +| test.c:378:10:378:17 | ... ? ... : ... | 0.0 | 0.0 | 500.0 | +| test.c:379:10:379:21 | ... ? ... : ... | 1.0 | 1.0 | 500.0 | +| test.c:380:10:380:36 | ... ? ... : ... | 0.0 | 1.0 | 5.0 | +| test.c:381:10:381:38 | ... ? ... : ... | 0.0 | 1.0 | 500.0 | +| test.c:382:10:382:39 | ... ? ... : ... | 1.0 | 1.0 | 500.0 | +| test.c:390:8:390:24 | ... ? ... : ... | 101.0 | 101.0 | 110.0 | +| test.c:391:8:391:25 | ... ? ... : ... | 101.0 | 110.0 | 101.0 | +| test.c:396:10:396:21 | ... ? ... : ... | 0.0 | 0.0 | 5.0 | +| test.c:397:10:397:21 | ... ? ... : ... | 100.0 | 100.0 | 5.0 | +| test.c:398:10:398:38 | ... ? ... : ... | 0.0 | 100.0 | 5.0 | +| test.c:405:14:405:108 | ... ? ... : ... | 0.14333887 | 0.14333887 | 0.40496805 | +| test.c:405:18:405:95 | ... ? ... : ... | 0.14333887 | 0.14333887 | 0.21540225 | +| test.c:405:22:405:82 | ... ? ... : ... | 0.14333887 | 0.14333887 | 0.39206458 | +| test.c:405:26:405:69 | ... ? ... : ... | 0.14333887 | 0.14333887 | 0.35279203 | +| test.c:405:30:405:56 | ... ? ... : ... | 0.14333887 | 0.47438827 | 0.14333887 | +| test.c:406:14:406:108 | ... ? ... : ... | 0.22247853 | 0.22247853 | 0.5297741 | +| test.c:406:18:406:95 | ... ? ... : ... | 0.22247853 | 0.22247853 | 0.59270465 | +| test.c:406:22:406:82 | ... ? ... : ... | 0.22247853 | 0.22247853 | 0.32661893 | +| test.c:406:26:406:69 | ... ? ... : ... | 0.22247853 | 0.34183348 | 0.22247853 | +| test.c:406:30:406:56 | ... ? ... : ... | 0.34183348 | 0.34183348 | 0.3533464 | +| test.c:407:14:407:108 | ... ? ... : ... | 0.05121256 | 0.05121256 | 0.67981451 | +| test.c:407:18:407:95 | ... ? ... : ... | 0.05121256 | 0.05121256 | 0.79310745 | +| test.c:407:22:407:82 | ... ? ... : ... | 0.05121256 | 0.31235514 | 0.05121256 | +| test.c:407:26:407:69 | ... ? ... : ... | 0.31235514 | 0.31478084 | 0.31235514 | +| test.c:407:30:407:56 | ... ? ... : ... | 0.31478084 | 0.77429603 | 0.31478084 | +| test.c:408:14:408:108 | ... ? ... : ... | 0.36976948 | 0.36976948 | 0.83866835 | +| test.c:408:18:408:95 | ... ? ... : ... | 0.36976948 | 0.44729556 | 0.36976948 | +| test.c:408:22:408:82 | ... ? ... : ... | 0.44729556 | 0.44729556 | 0.59952732 | +| test.c:408:26:408:69 | ... ? ... : ... | 0.44729556 | 0.44729556 | 0.98997262 | +| test.c:408:30:408:56 | ... ? ... : ... | 0.44729556 | 0.44729556 | 0.80599202 | +| test.c:409:14:409:108 | ... ? ... : ... | 0.10597712 | 0.10597712 | 0.68734874 | +| test.c:409:18:409:95 | ... ? ... : ... | 0.10597712 | 0.10597712 | 0.72485966 | +| test.c:409:22:409:82 | ... ? ... : ... | 0.10597712 | 0.10597712 | 0.21778426 | +| test.c:409:26:409:69 | ... ? ... : ... | 0.10597712 | 0.49311828 | 0.10597712 | +| test.c:409:30:409:56 | ... ? ... : ... | 0.49311828 | 0.49311828 | 0.90389911 | +| test.c:410:14:410:108 | ... ? ... : ... | 0.1078665 | 0.1078665 | 0.58440865 | +| test.c:410:18:410:95 | ... ? ... : ... | 0.1078665 | 0.1078665 | 0.34808892 | +| test.c:410:22:410:82 | ... ? ... : ... | 0.1078665 | 0.1078665 | 0.76164052 | +| test.c:410:26:410:69 | ... ? ... : ... | 0.1078665 | 0.1078665 | 0.11884576 | +| test.c:410:30:410:56 | ... ? ... : ... | 0.1078665 | 0.47452848 | 0.1078665 | +| test.c:411:14:411:108 | ... ? ... : ... | 0.02524326 | 0.02524326 | 0.36232384 | +| test.c:411:18:411:95 | ... ? ... : ... | 0.02524326 | 0.02524326 | 0.85235179 | +| test.c:411:22:411:82 | ... ? ... : ... | 0.02524326 | 0.02524326 | 0.12516558 | +| test.c:411:26:411:69 | ... ? ... : ... | 0.02524326 | 0.02524326 | 0.95823075 | +| test.c:411:30:411:56 | ... ? ... : ... | 0.02524326 | 0.02524326 | 0.82905046 | +| test.c:412:14:412:108 | ... ? ... : ... | 0.14963485 | 0.14963485 | 0.84331272 | +| test.c:412:18:412:95 | ... ? ... : ... | 0.14963485 | 0.14963485 | 0.48640909 | +| test.c:412:22:412:82 | ... ? ... : ... | 0.14963485 | 0.14963485 | 0.45041108 | +| test.c:412:26:412:69 | ... ? ... : ... | 0.14963485 | 0.32876044 | 0.14963485 | +| test.c:412:30:412:56 | ... ? ... : ... | 0.32876044 | 0.38708626 | 0.32876044 | +| test.c:413:14:413:108 | ... ? ... : ... | 0.05328182 | 0.14800508 | 0.05328182 | +| test.c:413:18:413:95 | ... ? ... : ... | 0.14800508 | 0.14800508 | 0.37428143 | +| test.c:413:22:413:82 | ... ? ... : ... | 0.14800508 | 0.15755063 | 0.14800508 | +| test.c:413:26:413:69 | ... ? ... : ... | 0.15755063 | 0.15755063 | 0.26428481 | +| test.c:413:30:413:56 | ... ? ... : ... | 0.15755063 | 0.15755063 | 0.77086833 | +| test.c:414:14:414:108 | ... ? ... : ... | 0.27643238 | 0.27643238 | 0.69072144 | +| test.c:414:18:414:95 | ... ? ... : ... | 0.27643238 | 0.27643238 | 0.39468857 | +| test.c:414:22:414:82 | ... ? ... : ... | 0.27643238 | 0.27643238 | 0.55679274 | +| test.c:414:26:414:69 | ... ? ... : ... | 0.27643238 | 0.41736536 | 0.27643238 | +| test.c:414:30:414:56 | ... ? ... : ... | 0.41736536 | 0.41736536 | 0.76826628 | +| test.c:415:14:415:108 | ... ? ... : ... | 0.2051911 | 0.2051911 | 0.81372798 | +| test.c:415:18:415:95 | ... ? ... : ... | 0.2051911 | 0.2051911 | 0.88745559 | +| test.c:415:22:415:82 | ... ? ... : ... | 0.2051911 | 0.29904824 | 0.2051911 | +| test.c:415:26:415:69 | ... ? ... : ... | 0.29904824 | 0.29904824 | 0.76242583 | +| test.c:415:30:415:56 | ... ? ... : ... | 0.29904824 | 0.88955345 | 0.29904824 | +| test.c:416:14:416:108 | ... ? ... : ... | 0.13204114 | 0.13204114 | 0.42762647 | +| test.c:416:18:416:95 | ... ? ... : ... | 0.13204114 | 0.13204114 | 0.52031241 | +| test.c:416:22:416:82 | ... ? ... : ... | 0.13204114 | 0.42186276 | 0.13204114 | +| test.c:416:26:416:69 | ... ? ... : ... | 0.42186276 | 0.42186276 | 0.44996679 | +| test.c:416:30:416:56 | ... ? ... : ... | 0.42186276 | 0.42186276 | 0.53843358 | +| test.c:429:20:429:36 | ... ? ... : ... | 0.0 | 0.0 | 100.0 | +| test.c:641:5:641:14 | ... ? ... : ... | 0.0 | 1.0 | 0.0 | +| test.c:642:5:642:14 | ... ? ... : ... | 0.0 | 0.0 | 1.0 | | test.cpp:121:3:121:12 | ... ? ... : ... | 0.0 | 1.0 | 0.0 | | test.cpp:122:3:122:12 | ... ? ... : ... | 0.0 | 0.0 | 1.0 | diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryUpper.expected b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryUpper.expected index b34beda10d42..d09854ebe67d 100644 --- a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryUpper.expected +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/ternaryUpper.expected @@ -1,79 +1,84 @@ | test.c:154:10:154:40 | ... ? ... : ... | 2.147483647E9 | 2.147483647E9 | -1.0 | -| test.c:357:8:357:23 | ... ? ... : ... | 99.0 | 99.0 | 10.0 | -| test.c:358:8:358:24 | ... ? ... : ... | 99.0 | 10.0 | 99.0 | -| test.c:366:10:366:15 | ... ? ... : ... | 299.0 | 299.0 | 5.0 | -| test.c:367:10:367:17 | ... ? ... : ... | 500.0 | 299.0 | 500.0 | -| test.c:368:10:368:21 | ... ? ... : ... | 300.0 | 300.0 | 500.0 | -| test.c:369:10:369:36 | ... ? ... : ... | 255.0 | 300.0 | 5.0 | -| test.c:370:10:370:38 | ... ? ... : ... | 500.0 | 300.0 | 500.0 | -| test.c:371:10:371:39 | ... ? ... : ... | 300.0 | 300.0 | 500.0 | -| test.c:379:8:379:24 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 110.0 | -| test.c:380:8:380:25 | ... ? ... : ... | 4.294967295E9 | 110.0 | 4.294967295E9 | -| test.c:385:10:385:21 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 5.0 | -| test.c:386:10:386:21 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 5.0 | -| test.c:387:10:387:38 | ... ? ... : ... | 255.0 | 4.294967295E9 | 5.0 | -| test.c:394:14:394:108 | ... ? ... : ... | 0.47438827 | 0.47438827 | 0.40496805 | -| test.c:394:18:394:95 | ... ? ... : ... | 0.47438827 | 0.47438827 | 0.21540225 | -| test.c:394:22:394:82 | ... ? ... : ... | 0.47438827 | 0.47438827 | 0.39206458 | -| test.c:394:26:394:69 | ... ? ... : ... | 0.47438827 | 0.47438827 | 0.35279203 | -| test.c:394:30:394:56 | ... ? ... : ... | 0.47438827 | 0.47438827 | 0.14333887 | -| test.c:395:14:395:108 | ... ? ... : ... | 0.59270465 | 0.59270465 | 0.5297741 | -| test.c:395:18:395:95 | ... ? ... : ... | 0.59270465 | 0.3533464 | 0.59270465 | -| test.c:395:22:395:82 | ... ? ... : ... | 0.3533464 | 0.3533464 | 0.32661893 | -| test.c:395:26:395:69 | ... ? ... : ... | 0.3533464 | 0.3533464 | 0.22247853 | -| test.c:395:30:395:56 | ... ? ... : ... | 0.3533464 | 0.34183348 | 0.3533464 | -| test.c:396:14:396:108 | ... ? ... : ... | 0.79310745 | 0.79310745 | 0.67981451 | -| test.c:396:18:396:95 | ... ? ... : ... | 0.79310745 | 0.77429603 | 0.79310745 | -| test.c:396:22:396:82 | ... ? ... : ... | 0.77429603 | 0.77429603 | 0.05121256 | -| test.c:396:26:396:69 | ... ? ... : ... | 0.77429603 | 0.77429603 | 0.31235514 | -| test.c:396:30:396:56 | ... ? ... : ... | 0.77429603 | 0.77429603 | 0.31478084 | -| test.c:397:14:397:108 | ... ? ... : ... | 0.98997262 | 0.98997262 | 0.83866835 | -| test.c:397:18:397:95 | ... ? ... : ... | 0.98997262 | 0.98997262 | 0.36976948 | -| test.c:397:22:397:82 | ... ? ... : ... | 0.98997262 | 0.98997262 | 0.59952732 | -| test.c:397:26:397:69 | ... ? ... : ... | 0.98997262 | 0.80599202 | 0.98997262 | -| test.c:397:30:397:56 | ... ? ... : ... | 0.80599202 | 0.44729556 | 0.80599202 | -| test.c:398:14:398:108 | ... ? ... : ... | 0.90389911 | 0.90389911 | 0.68734874 | -| test.c:398:18:398:95 | ... ? ... : ... | 0.90389911 | 0.90389911 | 0.72485966 | -| test.c:398:22:398:82 | ... ? ... : ... | 0.90389911 | 0.90389911 | 0.21778426 | -| test.c:398:26:398:69 | ... ? ... : ... | 0.90389911 | 0.90389911 | 0.10597712 | -| test.c:398:30:398:56 | ... ? ... : ... | 0.90389911 | 0.49311828 | 0.90389911 | -| test.c:399:14:399:108 | ... ? ... : ... | 0.76164052 | 0.76164052 | 0.58440865 | -| test.c:399:18:399:95 | ... ? ... : ... | 0.76164052 | 0.76164052 | 0.34808892 | -| test.c:399:22:399:82 | ... ? ... : ... | 0.76164052 | 0.47452848 | 0.76164052 | -| test.c:399:26:399:69 | ... ? ... : ... | 0.47452848 | 0.47452848 | 0.11884576 | -| test.c:399:30:399:56 | ... ? ... : ... | 0.47452848 | 0.47452848 | 0.1078665 | -| test.c:400:14:400:108 | ... ? ... : ... | 0.95823075 | 0.95823075 | 0.36232384 | -| test.c:400:18:400:95 | ... ? ... : ... | 0.95823075 | 0.95823075 | 0.85235179 | -| test.c:400:22:400:82 | ... ? ... : ... | 0.95823075 | 0.95823075 | 0.12516558 | -| test.c:400:26:400:69 | ... ? ... : ... | 0.95823075 | 0.82905046 | 0.95823075 | -| test.c:400:30:400:56 | ... ? ... : ... | 0.82905046 | 0.02524326 | 0.82905046 | -| test.c:401:14:401:108 | ... ? ... : ... | 0.84331272 | 0.48640909 | 0.84331272 | -| test.c:401:18:401:95 | ... ? ... : ... | 0.48640909 | 0.45041108 | 0.48640909 | -| test.c:401:22:401:82 | ... ? ... : ... | 0.45041108 | 0.38708626 | 0.45041108 | -| test.c:401:26:401:69 | ... ? ... : ... | 0.38708626 | 0.38708626 | 0.14963485 | -| test.c:401:30:401:56 | ... ? ... : ... | 0.38708626 | 0.38708626 | 0.32876044 | -| test.c:402:14:402:108 | ... ? ... : ... | 0.77086833 | 0.77086833 | 0.05328182 | -| test.c:402:18:402:95 | ... ? ... : ... | 0.77086833 | 0.77086833 | 0.37428143 | -| test.c:402:22:402:82 | ... ? ... : ... | 0.77086833 | 0.77086833 | 0.14800508 | -| test.c:402:26:402:69 | ... ? ... : ... | 0.77086833 | 0.77086833 | 0.26428481 | -| test.c:402:30:402:56 | ... ? ... : ... | 0.77086833 | 0.15755063 | 0.77086833 | -| test.c:403:14:403:108 | ... ? ... : ... | 0.76826628 | 0.76826628 | 0.69072144 | -| test.c:403:18:403:95 | ... ? ... : ... | 0.76826628 | 0.76826628 | 0.39468857 | -| test.c:403:22:403:82 | ... ? ... : ... | 0.76826628 | 0.76826628 | 0.55679274 | -| test.c:403:26:403:69 | ... ? ... : ... | 0.76826628 | 0.76826628 | 0.27643238 | -| test.c:403:30:403:56 | ... ? ... : ... | 0.76826628 | 0.41736536 | 0.76826628 | -| test.c:404:14:404:108 | ... ? ... : ... | 0.88955345 | 0.88955345 | 0.81372798 | -| test.c:404:18:404:95 | ... ? ... : ... | 0.88955345 | 0.88955345 | 0.88745559 | -| test.c:404:22:404:82 | ... ? ... : ... | 0.88955345 | 0.88955345 | 0.2051911 | -| test.c:404:26:404:69 | ... ? ... : ... | 0.88955345 | 0.88955345 | 0.76242583 | -| test.c:404:30:404:56 | ... ? ... : ... | 0.88955345 | 0.88955345 | 0.29904824 | -| test.c:405:14:405:108 | ... ? ... : ... | 0.53843358 | 0.53843358 | 0.42762647 | -| test.c:405:18:405:95 | ... ? ... : ... | 0.53843358 | 0.53843358 | 0.52031241 | -| test.c:405:22:405:82 | ... ? ... : ... | 0.53843358 | 0.53843358 | 0.13204114 | -| test.c:405:26:405:69 | ... ? ... : ... | 0.53843358 | 0.53843358 | 0.44996679 | -| test.c:405:30:405:56 | ... ? ... : ... | 0.53843358 | 0.42186276 | 0.53843358 | -| test.c:418:20:418:36 | ... ? ... : ... | 100.0 | 99.0 | 100.0 | -| test.c:630:5:630:14 | ... ? ... : ... | 32767.0 | 32767.0 | 0.0 | -| test.c:631:5:631:14 | ... ? ... : ... | 32767.0 | 0.0 | 32767.0 | +| test.c:338:22:338:44 | ... ? ... : ... | 2.147483647E9 | 2.147483647E9 | 2.0 | +| test.c:339:20:339:43 | ... ? ... : ... | 2.147483647E9 | 2.147483647E9 | 2.0 | +| test.c:340:22:340:44 | ... ? ... : ... | 1.431655764E9 | 1.431655764E9 | 2.0 | +| test.c:341:22:341:44 | ... ? ... : ... | 2.147483647E9 | 2.147483647E9 | 2.0 | +| test.c:342:22:342:45 | ... ? ... : ... | 2.147483647E9 | 2.147483647E9 | 2.0 | +| test.c:368:8:368:23 | ... ? ... : ... | 99.0 | 99.0 | 10.0 | +| test.c:369:8:369:24 | ... ? ... : ... | 99.0 | 10.0 | 99.0 | +| test.c:377:10:377:15 | ... ? ... : ... | 299.0 | 299.0 | 5.0 | +| test.c:378:10:378:17 | ... ? ... : ... | 500.0 | 299.0 | 500.0 | +| test.c:379:10:379:21 | ... ? ... : ... | 300.0 | 300.0 | 500.0 | +| test.c:380:10:380:36 | ... ? ... : ... | 255.0 | 300.0 | 5.0 | +| test.c:381:10:381:38 | ... ? ... : ... | 500.0 | 300.0 | 500.0 | +| test.c:382:10:382:39 | ... ? ... : ... | 300.0 | 300.0 | 500.0 | +| test.c:390:8:390:24 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 110.0 | +| test.c:391:8:391:25 | ... ? ... : ... | 4.294967295E9 | 110.0 | 4.294967295E9 | +| test.c:396:10:396:21 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 5.0 | +| test.c:397:10:397:21 | ... ? ... : ... | 4.294967295E9 | 4.294967295E9 | 5.0 | +| test.c:398:10:398:38 | ... ? ... : ... | 255.0 | 4.294967295E9 | 5.0 | +| test.c:405:14:405:108 | ... ? ... : ... | 0.47438827 | 0.47438827 | 0.40496805 | +| test.c:405:18:405:95 | ... ? ... : ... | 0.47438827 | 0.47438827 | 0.21540225 | +| test.c:405:22:405:82 | ... ? ... : ... | 0.47438827 | 0.47438827 | 0.39206458 | +| test.c:405:26:405:69 | ... ? ... : ... | 0.47438827 | 0.47438827 | 0.35279203 | +| test.c:405:30:405:56 | ... ? ... : ... | 0.47438827 | 0.47438827 | 0.14333887 | +| test.c:406:14:406:108 | ... ? ... : ... | 0.59270465 | 0.59270465 | 0.5297741 | +| test.c:406:18:406:95 | ... ? ... : ... | 0.59270465 | 0.3533464 | 0.59270465 | +| test.c:406:22:406:82 | ... ? ... : ... | 0.3533464 | 0.3533464 | 0.32661893 | +| test.c:406:26:406:69 | ... ? ... : ... | 0.3533464 | 0.3533464 | 0.22247853 | +| test.c:406:30:406:56 | ... ? ... : ... | 0.3533464 | 0.34183348 | 0.3533464 | +| test.c:407:14:407:108 | ... ? ... : ... | 0.79310745 | 0.79310745 | 0.67981451 | +| test.c:407:18:407:95 | ... ? ... : ... | 0.79310745 | 0.77429603 | 0.79310745 | +| test.c:407:22:407:82 | ... ? ... : ... | 0.77429603 | 0.77429603 | 0.05121256 | +| test.c:407:26:407:69 | ... ? ... : ... | 0.77429603 | 0.77429603 | 0.31235514 | +| test.c:407:30:407:56 | ... ? ... : ... | 0.77429603 | 0.77429603 | 0.31478084 | +| test.c:408:14:408:108 | ... ? ... : ... | 0.98997262 | 0.98997262 | 0.83866835 | +| test.c:408:18:408:95 | ... ? ... : ... | 0.98997262 | 0.98997262 | 0.36976948 | +| test.c:408:22:408:82 | ... ? ... : ... | 0.98997262 | 0.98997262 | 0.59952732 | +| test.c:408:26:408:69 | ... ? ... : ... | 0.98997262 | 0.80599202 | 0.98997262 | +| test.c:408:30:408:56 | ... ? ... : ... | 0.80599202 | 0.44729556 | 0.80599202 | +| test.c:409:14:409:108 | ... ? ... : ... | 0.90389911 | 0.90389911 | 0.68734874 | +| test.c:409:18:409:95 | ... ? ... : ... | 0.90389911 | 0.90389911 | 0.72485966 | +| test.c:409:22:409:82 | ... ? ... : ... | 0.90389911 | 0.90389911 | 0.21778426 | +| test.c:409:26:409:69 | ... ? ... : ... | 0.90389911 | 0.90389911 | 0.10597712 | +| test.c:409:30:409:56 | ... ? ... : ... | 0.90389911 | 0.49311828 | 0.90389911 | +| test.c:410:14:410:108 | ... ? ... : ... | 0.76164052 | 0.76164052 | 0.58440865 | +| test.c:410:18:410:95 | ... ? ... : ... | 0.76164052 | 0.76164052 | 0.34808892 | +| test.c:410:22:410:82 | ... ? ... : ... | 0.76164052 | 0.47452848 | 0.76164052 | +| test.c:410:26:410:69 | ... ? ... : ... | 0.47452848 | 0.47452848 | 0.11884576 | +| test.c:410:30:410:56 | ... ? ... : ... | 0.47452848 | 0.47452848 | 0.1078665 | +| test.c:411:14:411:108 | ... ? ... : ... | 0.95823075 | 0.95823075 | 0.36232384 | +| test.c:411:18:411:95 | ... ? ... : ... | 0.95823075 | 0.95823075 | 0.85235179 | +| test.c:411:22:411:82 | ... ? ... : ... | 0.95823075 | 0.95823075 | 0.12516558 | +| test.c:411:26:411:69 | ... ? ... : ... | 0.95823075 | 0.82905046 | 0.95823075 | +| test.c:411:30:411:56 | ... ? ... : ... | 0.82905046 | 0.02524326 | 0.82905046 | +| test.c:412:14:412:108 | ... ? ... : ... | 0.84331272 | 0.48640909 | 0.84331272 | +| test.c:412:18:412:95 | ... ? ... : ... | 0.48640909 | 0.45041108 | 0.48640909 | +| test.c:412:22:412:82 | ... ? ... : ... | 0.45041108 | 0.38708626 | 0.45041108 | +| test.c:412:26:412:69 | ... ? ... : ... | 0.38708626 | 0.38708626 | 0.14963485 | +| test.c:412:30:412:56 | ... ? ... : ... | 0.38708626 | 0.38708626 | 0.32876044 | +| test.c:413:14:413:108 | ... ? ... : ... | 0.77086833 | 0.77086833 | 0.05328182 | +| test.c:413:18:413:95 | ... ? ... : ... | 0.77086833 | 0.77086833 | 0.37428143 | +| test.c:413:22:413:82 | ... ? ... : ... | 0.77086833 | 0.77086833 | 0.14800508 | +| test.c:413:26:413:69 | ... ? ... : ... | 0.77086833 | 0.77086833 | 0.26428481 | +| test.c:413:30:413:56 | ... ? ... : ... | 0.77086833 | 0.15755063 | 0.77086833 | +| test.c:414:14:414:108 | ... ? ... : ... | 0.76826628 | 0.76826628 | 0.69072144 | +| test.c:414:18:414:95 | ... ? ... : ... | 0.76826628 | 0.76826628 | 0.39468857 | +| test.c:414:22:414:82 | ... ? ... : ... | 0.76826628 | 0.76826628 | 0.55679274 | +| test.c:414:26:414:69 | ... ? ... : ... | 0.76826628 | 0.76826628 | 0.27643238 | +| test.c:414:30:414:56 | ... ? ... : ... | 0.76826628 | 0.41736536 | 0.76826628 | +| test.c:415:14:415:108 | ... ? ... : ... | 0.88955345 | 0.88955345 | 0.81372798 | +| test.c:415:18:415:95 | ... ? ... : ... | 0.88955345 | 0.88955345 | 0.88745559 | +| test.c:415:22:415:82 | ... ? ... : ... | 0.88955345 | 0.88955345 | 0.2051911 | +| test.c:415:26:415:69 | ... ? ... : ... | 0.88955345 | 0.88955345 | 0.76242583 | +| test.c:415:30:415:56 | ... ? ... : ... | 0.88955345 | 0.88955345 | 0.29904824 | +| test.c:416:14:416:108 | ... ? ... : ... | 0.53843358 | 0.53843358 | 0.42762647 | +| test.c:416:18:416:95 | ... ? ... : ... | 0.53843358 | 0.53843358 | 0.52031241 | +| test.c:416:22:416:82 | ... ? ... : ... | 0.53843358 | 0.53843358 | 0.13204114 | +| test.c:416:26:416:69 | ... ? ... : ... | 0.53843358 | 0.53843358 | 0.44996679 | +| test.c:416:30:416:56 | ... ? ... : ... | 0.53843358 | 0.42186276 | 0.53843358 | +| test.c:429:20:429:36 | ... ? ... : ... | 100.0 | 99.0 | 100.0 | +| test.c:641:5:641:14 | ... ? ... : ... | 32767.0 | 32767.0 | 0.0 | +| test.c:642:5:642:14 | ... ? ... : ... | 32767.0 | 0.0 | 32767.0 | | test.cpp:121:3:121:12 | ... ? ... : ... | 32767.0 | 32767.0 | 0.0 | | test.cpp:122:3:122:12 | ... ? ... : ... | 32767.0 | 0.0 | 32767.0 | diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/test.c b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/test.c index db7c71e00504..f9442d9d3722 100644 --- a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/test.c +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/test.c @@ -333,6 +333,17 @@ int test_mult05(int a, int b) { return total; } +// Tests for bounds on integers derived from inequalities. +unsigned int test_inequality_integer(unsigned int e) { + unsigned int bi1 = (2 * e + 1) > 0 ? e : 2; + signed int bi2 = (2 * e + 1) >= 0 ? e : 2; + unsigned int bi3 = (3 * e + 2) > 0 ? e : 2; + unsigned int bi4 = (2 * e + 1) > 0 ? e : 2; + unsigned int bi5 = (2 * e + 1) > 16 ? e : 2; + + return bi1 + bi2 + bi3 + bi4 + bi5; +} + int test16(int x) { int d, i = 0; if (x < 0) { diff --git a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/upperBound.expected b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/upperBound.expected index 8696ecfe8d09..37d792bf3392 100644 --- a/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/upperBound.expected +++ b/cpp/ql/test/library-tests/rangeanalysis/SimpleRangeAnalysis/upperBound.expected @@ -350,332 +350,347 @@ | test.c:330:5:330:9 | total | 2147483647 | | test.c:330:14:330:14 | r | 2147483647 | | test.c:333:10:333:14 | total | 2147483647 | -| test.c:338:7:338:7 | x | 2147483647 | -| test.c:342:10:342:10 | i | 7 | -| test.c:343:5:343:5 | i | 2 | -| test.c:345:3:345:3 | d | 2147483647 | -| test.c:345:7:345:7 | i | 7 | -| test.c:346:7:346:7 | x | 2147483647 | -| test.c:347:9:347:9 | d | 7 | -| test.c:347:14:347:14 | x | -1 | -| test.c:357:3:357:4 | y1 | 4294967295 | -| test.c:357:8:357:8 | x | 4294967295 | -| test.c:357:18:357:18 | x | 99 | -| test.c:358:3:358:4 | y2 | 4294967295 | -| test.c:358:8:358:8 | x | 4294967295 | -| test.c:358:24:358:24 | x | 99 | -| test.c:359:3:359:4 | y3 | 4294967295 | -| test.c:360:3:360:4 | y4 | 4294967295 | -| test.c:361:3:361:4 | y5 | 4294967295 | -| test.c:362:3:362:4 | y6 | 4294967295 | -| test.c:363:3:363:4 | y7 | 4294967295 | -| test.c:364:3:364:4 | y8 | 4294967295 | -| test.c:365:7:365:7 | x | 4294967295 | -| test.c:366:5:366:6 | y3 | 4294967295 | -| test.c:366:10:366:10 | x | 299 | -| test.c:367:5:367:6 | y4 | 4294967295 | -| test.c:367:10:367:10 | x | 299 | -| test.c:368:5:368:6 | y5 | 4294967295 | -| test.c:368:11:368:11 | x | 299 | -| test.c:369:5:369:6 | y6 | 4294967295 | -| test.c:369:27:369:27 | x | 299 | -| test.c:370:5:370:6 | y7 | 4294967295 | -| test.c:370:27:370:27 | x | 299 | -| test.c:371:5:371:6 | y8 | 4294967295 | -| test.c:371:28:371:28 | x | 299 | -| test.c:373:10:373:11 | y1 | 99 | -| test.c:373:15:373:16 | y2 | 99 | -| test.c:373:20:373:21 | y3 | 299 | -| test.c:373:25:373:26 | y4 | 500 | -| test.c:373:30:373:31 | y5 | 300 | -| test.c:373:35:373:36 | y6 | 255 | -| test.c:373:40:373:41 | y7 | 500 | -| test.c:373:45:373:46 | y8 | 300 | -| test.c:379:3:379:4 | y1 | 4294967295 | -| test.c:379:8:379:8 | x | 4294967295 | -| test.c:379:18:379:18 | x | 4294967295 | -| test.c:380:3:380:4 | y2 | 4294967295 | -| test.c:380:8:380:8 | x | 4294967295 | -| test.c:380:25:380:25 | x | 4294967295 | -| test.c:381:3:381:4 | y3 | 4294967295 | -| test.c:382:3:382:4 | y4 | 4294967295 | -| test.c:383:3:383:4 | y5 | 4294967295 | -| test.c:384:7:384:7 | x | 4294967295 | -| test.c:385:5:385:6 | y3 | 4294967295 | -| test.c:385:11:385:11 | x | 4294967295 | -| test.c:386:5:386:6 | y4 | 4294967295 | -| test.c:386:11:386:11 | x | 4294967295 | -| test.c:387:5:387:6 | y5 | 4294967295 | -| test.c:387:27:387:27 | x | 4294967295 | -| test.c:389:10:389:11 | y1 | 4294967295 | -| test.c:389:15:389:16 | y2 | 4294967295 | -| test.c:389:20:389:21 | y3 | 4294967295 | -| test.c:389:25:389:26 | y4 | 4294967295 | -| test.c:389:30:389:31 | y5 | 1000 | -| test.c:394:14:394:14 | m | Infinity | -| test.c:394:18:394:18 | n | Infinity | -| test.c:394:22:394:22 | o | Infinity | -| test.c:394:26:394:26 | p | Infinity | -| test.c:394:30:394:30 | q | Infinity | -| test.c:395:14:395:14 | m | Infinity | -| test.c:395:18:395:18 | n | Infinity | -| test.c:395:22:395:22 | o | Infinity | -| test.c:395:26:395:26 | p | Infinity | -| test.c:395:30:395:30 | q | Infinity | -| test.c:396:14:396:14 | m | Infinity | -| test.c:396:18:396:18 | n | Infinity | -| test.c:396:22:396:22 | o | Infinity | -| test.c:396:26:396:26 | p | Infinity | -| test.c:396:30:396:30 | q | Infinity | -| test.c:397:14:397:14 | m | Infinity | -| test.c:397:18:397:18 | n | Infinity | -| test.c:397:22:397:22 | o | Infinity | -| test.c:397:26:397:26 | p | Infinity | -| test.c:397:30:397:30 | q | Infinity | -| test.c:398:14:398:14 | m | Infinity | -| test.c:398:18:398:18 | n | Infinity | -| test.c:398:22:398:22 | o | Infinity | -| test.c:398:26:398:26 | p | Infinity | -| test.c:398:30:398:30 | q | Infinity | -| test.c:399:14:399:14 | m | Infinity | -| test.c:399:18:399:18 | n | Infinity | -| test.c:399:22:399:22 | o | Infinity | -| test.c:399:26:399:26 | p | Infinity | -| test.c:399:30:399:30 | q | Infinity | -| test.c:400:14:400:14 | m | Infinity | -| test.c:400:18:400:18 | n | Infinity | -| test.c:400:22:400:22 | o | Infinity | -| test.c:400:26:400:26 | p | Infinity | -| test.c:400:30:400:30 | q | Infinity | -| test.c:401:14:401:14 | m | Infinity | -| test.c:401:18:401:18 | n | Infinity | -| test.c:401:22:401:22 | o | Infinity | -| test.c:401:26:401:26 | p | Infinity | -| test.c:401:30:401:30 | q | Infinity | -| test.c:402:14:402:14 | m | Infinity | -| test.c:402:18:402:18 | n | Infinity | -| test.c:402:22:402:22 | o | Infinity | -| test.c:402:26:402:26 | p | Infinity | -| test.c:402:30:402:30 | q | Infinity | -| test.c:403:14:403:14 | m | Infinity | -| test.c:403:18:403:18 | n | Infinity | -| test.c:403:22:403:22 | o | Infinity | -| test.c:403:26:403:26 | p | Infinity | -| test.c:403:30:403:30 | q | Infinity | -| test.c:404:14:404:14 | m | Infinity | -| test.c:404:18:404:18 | n | Infinity | -| test.c:404:22:404:22 | o | Infinity | -| test.c:404:26:404:26 | p | Infinity | -| test.c:404:30:404:30 | q | Infinity | +| test.c:338:27:338:27 | e | 4294967295 | +| test.c:338:40:338:40 | e | 2147483647 | +| test.c:339:25:339:25 | e | 4294967295 | +| test.c:339:39:339:39 | e | 2147483647 | +| test.c:340:27:340:27 | e | 4294967295 | +| test.c:340:40:340:40 | e | 1431655764 | +| test.c:341:27:341:27 | e | 4294967295 | +| test.c:341:40:341:40 | e | 2147483647 | +| test.c:342:27:342:27 | e | 4294967295 | +| test.c:342:41:342:41 | e | 2147483647 | +| test.c:344:10:344:12 | bi1 | 2147483647 | +| test.c:344:16:344:18 | bi2 | 2147483647 | +| test.c:344:22:344:24 | bi3 | 1431655764 | +| test.c:344:28:344:30 | bi4 | 2147483647 | +| test.c:344:34:344:36 | bi5 | 2147483647 | +| test.c:349:7:349:7 | x | 2147483647 | +| test.c:353:10:353:10 | i | 7 | +| test.c:354:5:354:5 | i | 2 | +| test.c:356:3:356:3 | d | 2147483647 | +| test.c:356:7:356:7 | i | 7 | +| test.c:357:7:357:7 | x | 2147483647 | +| test.c:358:9:358:9 | d | 7 | +| test.c:358:14:358:14 | x | -1 | +| test.c:368:3:368:4 | y1 | 4294967295 | +| test.c:368:8:368:8 | x | 4294967295 | +| test.c:368:18:368:18 | x | 99 | +| test.c:369:3:369:4 | y2 | 4294967295 | +| test.c:369:8:369:8 | x | 4294967295 | +| test.c:369:24:369:24 | x | 99 | +| test.c:370:3:370:4 | y3 | 4294967295 | +| test.c:371:3:371:4 | y4 | 4294967295 | +| test.c:372:3:372:4 | y5 | 4294967295 | +| test.c:373:3:373:4 | y6 | 4294967295 | +| test.c:374:3:374:4 | y7 | 4294967295 | +| test.c:375:3:375:4 | y8 | 4294967295 | +| test.c:376:7:376:7 | x | 4294967295 | +| test.c:377:5:377:6 | y3 | 4294967295 | +| test.c:377:10:377:10 | x | 299 | +| test.c:378:5:378:6 | y4 | 4294967295 | +| test.c:378:10:378:10 | x | 299 | +| test.c:379:5:379:6 | y5 | 4294967295 | +| test.c:379:11:379:11 | x | 299 | +| test.c:380:5:380:6 | y6 | 4294967295 | +| test.c:380:27:380:27 | x | 299 | +| test.c:381:5:381:6 | y7 | 4294967295 | +| test.c:381:27:381:27 | x | 299 | +| test.c:382:5:382:6 | y8 | 4294967295 | +| test.c:382:28:382:28 | x | 299 | +| test.c:384:10:384:11 | y1 | 99 | +| test.c:384:15:384:16 | y2 | 99 | +| test.c:384:20:384:21 | y3 | 299 | +| test.c:384:25:384:26 | y4 | 500 | +| test.c:384:30:384:31 | y5 | 300 | +| test.c:384:35:384:36 | y6 | 255 | +| test.c:384:40:384:41 | y7 | 500 | +| test.c:384:45:384:46 | y8 | 300 | +| test.c:390:3:390:4 | y1 | 4294967295 | +| test.c:390:8:390:8 | x | 4294967295 | +| test.c:390:18:390:18 | x | 4294967295 | +| test.c:391:3:391:4 | y2 | 4294967295 | +| test.c:391:8:391:8 | x | 4294967295 | +| test.c:391:25:391:25 | x | 4294967295 | +| test.c:392:3:392:4 | y3 | 4294967295 | +| test.c:393:3:393:4 | y4 | 4294967295 | +| test.c:394:3:394:4 | y5 | 4294967295 | +| test.c:395:7:395:7 | x | 4294967295 | +| test.c:396:5:396:6 | y3 | 4294967295 | +| test.c:396:11:396:11 | x | 4294967295 | +| test.c:397:5:397:6 | y4 | 4294967295 | +| test.c:397:11:397:11 | x | 4294967295 | +| test.c:398:5:398:6 | y5 | 4294967295 | +| test.c:398:27:398:27 | x | 4294967295 | +| test.c:400:10:400:11 | y1 | 4294967295 | +| test.c:400:15:400:16 | y2 | 4294967295 | +| test.c:400:20:400:21 | y3 | 4294967295 | +| test.c:400:25:400:26 | y4 | 4294967295 | +| test.c:400:30:400:31 | y5 | 1000 | | test.c:405:14:405:14 | m | Infinity | | test.c:405:18:405:18 | n | Infinity | | test.c:405:22:405:22 | o | Infinity | | test.c:405:26:405:26 | p | Infinity | | test.c:405:30:405:30 | q | Infinity | -| test.c:411:19:411:19 | a | 0.474388 | -| test.c:411:23:411:23 | b | 0.592705 | -| test.c:411:27:411:27 | c | 0.793107 | -| test.c:411:31:411:31 | d | 0.989973 | -| test.c:411:35:411:35 | e | 0.903899 | -| test.c:411:39:411:39 | f | 0.761641 | -| test.c:411:43:411:43 | g | 0.958231 | -| test.c:411:47:411:47 | h | 0.843313 | -| test.c:411:51:411:51 | i | 0.770868 | -| test.c:411:55:411:55 | j | 0.768266 | -| test.c:411:59:411:59 | k | 0.889553 | -| test.c:411:63:411:63 | l | 0.538434 | -| test.c:413:10:413:15 | output | 9.284378 | -| test.c:418:20:418:20 | x | 4294967295 | -| test.c:418:30:418:30 | x | 99 | -| test.c:421:3:421:4 | y1 | 4294967295 | -| test.c:421:11:421:11 | y | 100 | -| test.c:421:14:421:14 | y | 101 | -| test.c:422:3:422:4 | y2 | 4294967295 | -| test.c:422:9:422:9 | y | 101 | -| test.c:422:14:422:14 | y | 102 | -| test.c:422:22:422:22 | y | 105 | -| test.c:423:10:423:11 | y1 | 101 | -| test.c:423:15:423:16 | y2 | 105 | -| test.c:431:3:431:3 | i | 2147483647 | -| test.c:432:7:432:7 | i | 10 | -| test.c:434:3:434:3 | i | 2147483647 | -| test.c:435:3:435:3 | i | 10 | -| test.c:436:7:436:7 | i | 20 | -| test.c:438:3:438:3 | i | 2147483647 | -| test.c:439:3:439:3 | i | 40 | -| test.c:440:7:440:7 | i | 30 | +| test.c:406:14:406:14 | m | Infinity | +| test.c:406:18:406:18 | n | Infinity | +| test.c:406:22:406:22 | o | Infinity | +| test.c:406:26:406:26 | p | Infinity | +| test.c:406:30:406:30 | q | Infinity | +| test.c:407:14:407:14 | m | Infinity | +| test.c:407:18:407:18 | n | Infinity | +| test.c:407:22:407:22 | o | Infinity | +| test.c:407:26:407:26 | p | Infinity | +| test.c:407:30:407:30 | q | Infinity | +| test.c:408:14:408:14 | m | Infinity | +| test.c:408:18:408:18 | n | Infinity | +| test.c:408:22:408:22 | o | Infinity | +| test.c:408:26:408:26 | p | Infinity | +| test.c:408:30:408:30 | q | Infinity | +| test.c:409:14:409:14 | m | Infinity | +| test.c:409:18:409:18 | n | Infinity | +| test.c:409:22:409:22 | o | Infinity | +| test.c:409:26:409:26 | p | Infinity | +| test.c:409:30:409:30 | q | Infinity | +| test.c:410:14:410:14 | m | Infinity | +| test.c:410:18:410:18 | n | Infinity | +| test.c:410:22:410:22 | o | Infinity | +| test.c:410:26:410:26 | p | Infinity | +| test.c:410:30:410:30 | q | Infinity | +| test.c:411:14:411:14 | m | Infinity | +| test.c:411:18:411:18 | n | Infinity | +| test.c:411:22:411:22 | o | Infinity | +| test.c:411:26:411:26 | p | Infinity | +| test.c:411:30:411:30 | q | Infinity | +| test.c:412:14:412:14 | m | Infinity | +| test.c:412:18:412:18 | n | Infinity | +| test.c:412:22:412:22 | o | Infinity | +| test.c:412:26:412:26 | p | Infinity | +| test.c:412:30:412:30 | q | Infinity | +| test.c:413:14:413:14 | m | Infinity | +| test.c:413:18:413:18 | n | Infinity | +| test.c:413:22:413:22 | o | Infinity | +| test.c:413:26:413:26 | p | Infinity | +| test.c:413:30:413:30 | q | Infinity | +| test.c:414:14:414:14 | m | Infinity | +| test.c:414:18:414:18 | n | Infinity | +| test.c:414:22:414:22 | o | Infinity | +| test.c:414:26:414:26 | p | Infinity | +| test.c:414:30:414:30 | q | Infinity | +| test.c:415:14:415:14 | m | Infinity | +| test.c:415:18:415:18 | n | Infinity | +| test.c:415:22:415:22 | o | Infinity | +| test.c:415:26:415:26 | p | Infinity | +| test.c:415:30:415:30 | q | Infinity | +| test.c:416:14:416:14 | m | Infinity | +| test.c:416:18:416:18 | n | Infinity | +| test.c:416:22:416:22 | o | Infinity | +| test.c:416:26:416:26 | p | Infinity | +| test.c:416:30:416:30 | q | Infinity | +| test.c:422:19:422:19 | a | 0.474388 | +| test.c:422:23:422:23 | b | 0.592705 | +| test.c:422:27:422:27 | c | 0.793107 | +| test.c:422:31:422:31 | d | 0.989973 | +| test.c:422:35:422:35 | e | 0.903899 | +| test.c:422:39:422:39 | f | 0.761641 | +| test.c:422:43:422:43 | g | 0.958231 | +| test.c:422:47:422:47 | h | 0.843313 | +| test.c:422:51:422:51 | i | 0.770868 | +| test.c:422:55:422:55 | j | 0.768266 | +| test.c:422:59:422:59 | k | 0.889553 | +| test.c:422:63:422:63 | l | 0.538434 | +| test.c:424:10:424:15 | output | 9.284378 | +| test.c:429:20:429:20 | x | 4294967295 | +| test.c:429:30:429:30 | x | 99 | +| test.c:432:3:432:4 | y1 | 4294967295 | +| test.c:432:11:432:11 | y | 100 | +| test.c:432:14:432:14 | y | 101 | +| test.c:433:3:433:4 | y2 | 4294967295 | +| test.c:433:9:433:9 | y | 101 | +| test.c:433:14:433:14 | y | 102 | +| test.c:433:22:433:22 | y | 105 | +| test.c:434:10:434:11 | y1 | 101 | +| test.c:434:15:434:16 | y2 | 105 | | test.c:442:3:442:3 | i | 2147483647 | -| test.c:442:7:442:7 | j | 2147483647 | -| test.c:443:7:443:7 | i | 40 | +| test.c:443:7:443:7 | i | 10 | | test.c:445:3:445:3 | i | 2147483647 | -| test.c:445:8:445:8 | j | 40 | -| test.c:446:7:446:7 | i | 50 | -| test.c:448:3:448:3 | i | 2147483647 | -| test.c:448:13:448:13 | j | 50 | -| test.c:449:7:449:7 | i | 60 | -| test.c:456:12:456:12 | a | 4294967295 | -| test.c:456:17:456:17 | a | 4294967295 | -| test.c:456:33:456:33 | b | 4294967295 | -| test.c:456:38:456:38 | b | 4294967295 | -| test.c:457:13:457:13 | a | 11 | -| test.c:457:15:457:15 | b | 23 | -| test.c:458:5:458:9 | total | 0 | -| test.c:458:14:458:14 | r | 253 | -| test.c:460:12:460:12 | a | 4294967295 | -| test.c:460:17:460:17 | a | 4294967295 | -| test.c:460:33:460:33 | b | 4294967295 | -| test.c:460:38:460:38 | b | 4294967295 | -| test.c:461:13:461:13 | a | 11 | -| test.c:461:15:461:15 | b | 23 | -| test.c:462:5:462:9 | total | 253 | -| test.c:462:14:462:14 | r | 253 | -| test.c:464:12:464:12 | a | 4294967295 | -| test.c:464:17:464:17 | a | 4294967295 | -| test.c:464:34:464:34 | b | 4294967295 | -| test.c:464:39:464:39 | b | 4294967295 | -| test.c:465:13:465:13 | a | 11 | -| test.c:465:15:465:15 | b | 23 | -| test.c:466:5:466:9 | total | 506 | -| test.c:466:14:466:14 | r | 253 | -| test.c:469:10:469:14 | total | 759 | -| test.c:475:12:475:12 | b | 4294967295 | -| test.c:475:17:475:17 | b | 4294967295 | -| test.c:476:16:476:16 | b | 23 | -| test.c:477:5:477:9 | total | 0 | +| test.c:446:3:446:3 | i | 10 | +| test.c:447:7:447:7 | i | 20 | +| test.c:449:3:449:3 | i | 2147483647 | +| test.c:450:3:450:3 | i | 40 | +| test.c:451:7:451:7 | i | 30 | +| test.c:453:3:453:3 | i | 2147483647 | +| test.c:453:7:453:7 | j | 2147483647 | +| test.c:454:7:454:7 | i | 40 | +| test.c:456:3:456:3 | i | 2147483647 | +| test.c:456:8:456:8 | j | 40 | +| test.c:457:7:457:7 | i | 50 | +| test.c:459:3:459:3 | i | 2147483647 | +| test.c:459:13:459:13 | j | 50 | +| test.c:460:7:460:7 | i | 60 | +| test.c:467:12:467:12 | a | 4294967295 | +| test.c:467:17:467:17 | a | 4294967295 | +| test.c:467:33:467:33 | b | 4294967295 | +| test.c:467:38:467:38 | b | 4294967295 | +| test.c:468:13:468:13 | a | 11 | +| test.c:468:15:468:15 | b | 23 | +| test.c:469:5:469:9 | total | 0 | +| test.c:469:14:469:14 | r | 253 | +| test.c:471:12:471:12 | a | 4294967295 | +| test.c:471:17:471:17 | a | 4294967295 | +| test.c:471:33:471:33 | b | 4294967295 | +| test.c:471:38:471:38 | b | 4294967295 | +| test.c:472:13:472:13 | a | 11 | +| test.c:472:15:472:15 | b | 23 | +| test.c:473:5:473:9 | total | 253 | +| test.c:473:14:473:14 | r | 253 | +| test.c:475:12:475:12 | a | 4294967295 | +| test.c:475:17:475:17 | a | 4294967295 | +| test.c:475:34:475:34 | b | 4294967295 | +| test.c:475:39:475:39 | b | 4294967295 | +| test.c:476:13:476:13 | a | 11 | +| test.c:476:15:476:15 | b | 23 | +| test.c:477:5:477:9 | total | 506 | | test.c:477:14:477:14 | r | 253 | -| test.c:479:12:479:12 | b | 4294967295 | -| test.c:479:17:479:17 | b | 4294967295 | -| test.c:480:16:480:16 | b | 23 | -| test.c:481:5:481:9 | total | 253 | -| test.c:481:14:481:14 | r | 253 | -| test.c:483:13:483:13 | b | 4294967295 | -| test.c:483:18:483:18 | b | 4294967295 | -| test.c:484:16:484:16 | b | 23 | -| test.c:485:5:485:9 | total | 506 | -| test.c:485:14:485:14 | r | 253 | -| test.c:488:10:488:14 | total | 759 | -| test.c:493:3:493:3 | x | 18446744073709551616 | -| test.c:493:7:493:7 | y | 18446744073709551616 | -| test.c:494:3:494:4 | xy | 18446744073709551616 | -| test.c:494:8:494:8 | x | 1000000003 | -| test.c:494:12:494:12 | y | 1000000003 | -| test.c:495:10:495:11 | xy | 1000000006000000000 | -| test.c:500:3:500:3 | x | 18446744073709551616 | -| test.c:501:3:501:3 | y | 18446744073709551616 | -| test.c:502:3:502:4 | xy | 18446744073709551616 | -| test.c:502:8:502:8 | x | 274177 | -| test.c:502:12:502:12 | y | 67280421310721 | -| test.c:503:10:503:11 | xy | 18446744073709551616 | -| test.c:507:7:507:8 | ui | 4294967295 | -| test.c:508:43:508:44 | ui | 4294967295 | -| test.c:508:48:508:49 | ui | 4294967295 | -| test.c:509:12:509:17 | result | 18446744065119617024 | -| test.c:511:7:511:8 | ul | 18446744073709551616 | -| test.c:512:28:512:29 | ul | 18446744073709551616 | -| test.c:512:33:512:34 | ul | 18446744073709551616 | -| test.c:513:12:513:17 | result | 18446744073709551616 | -| test.c:519:7:519:8 | ui | 4294967295 | -| test.c:519:19:519:20 | ui | 10 | -| test.c:520:5:520:6 | ui | 10 | -| test.c:520:11:520:12 | ui | 10 | -| test.c:521:12:521:13 | ui | 100 | -| test.c:525:3:525:9 | uiconst | 10 | -| test.c:528:3:528:9 | ulconst | 10 | -| test.c:529:10:529:16 | uiconst | 40 | -| test.c:529:20:529:26 | ulconst | 40 | -| test.c:533:7:533:7 | i | 2147483647 | -| test.c:533:18:533:18 | i | 2147483647 | -| test.c:534:5:534:5 | i | 2147483647 | -| test.c:534:13:534:13 | i | 2 | -| test.c:535:9:535:9 | i | 10 | -| test.c:537:5:537:5 | i | 2147483647 | -| test.c:537:9:537:9 | i | 10 | -| test.c:538:9:538:9 | i | 15 | -| test.c:540:5:540:5 | i | 15 | -| test.c:541:9:541:9 | i | 105 | -| test.c:543:5:543:5 | i | 105 | -| test.c:544:9:544:9 | i | 2310 | -| test.c:546:7:546:7 | i | 2147483647 | -| test.c:547:5:547:5 | i | 2147483647 | -| test.c:547:9:547:9 | i | -1 | -| test.c:548:9:548:9 | i | 1 | -| test.c:550:3:550:3 | i | 2147483647 | -| test.c:550:7:550:7 | i | 2147483647 | -| test.c:551:10:551:10 | i | 2147483647 | -| test.c:554:3:554:3 | i | 2147483647 | -| test.c:554:10:554:11 | sc | 1 | -| test.c:556:7:556:7 | i | 127 | -| test.c:563:7:563:7 | n | 4294967295 | -| test.c:565:7:565:7 | n | 4294967295 | -| test.c:566:9:566:9 | n | 4294967295 | -| test.c:569:7:569:7 | n | 4294967295 | -| test.c:570:9:570:9 | n | 4294967295 | -| test.c:572:9:572:9 | n | 0 | -| test.c:575:8:575:8 | n | 4294967295 | -| test.c:576:9:576:9 | n | 0 | -| test.c:578:9:578:9 | n | 4294967295 | -| test.c:581:10:581:10 | n | 4294967295 | -| test.c:582:5:582:5 | n | 4294967295 | -| test.c:585:7:585:7 | n | 0 | -| test.c:589:7:589:7 | n | 32767 | -| test.c:592:7:592:7 | n | 32767 | -| test.c:593:9:593:9 | n | 0 | -| test.c:595:9:595:9 | n | 32767 | -| test.c:598:7:598:7 | n | 32767 | -| test.c:599:9:599:9 | n | 32767 | -| test.c:601:9:601:9 | n | 0 | -| test.c:604:10:604:10 | n | 32767 | -| test.c:605:5:605:5 | n | 32767 | -| test.c:608:7:608:7 | n | 0 | -| test.c:612:7:612:7 | n | 32767 | -| test.c:613:9:613:9 | n | 32767 | -| test.c:614:11:614:11 | n | 32767 | -| test.c:618:7:618:7 | n | 32767 | -| test.c:619:13:619:13 | n | 32767 | -| test.c:622:9:622:9 | n | 32767 | -| test.c:625:7:625:7 | n | 32767 | -| test.c:625:22:625:22 | n | 32767 | -| test.c:626:9:626:9 | n | 32767 | +| test.c:480:10:480:14 | total | 759 | +| test.c:486:12:486:12 | b | 4294967295 | +| test.c:486:17:486:17 | b | 4294967295 | +| test.c:487:16:487:16 | b | 23 | +| test.c:488:5:488:9 | total | 0 | +| test.c:488:14:488:14 | r | 253 | +| test.c:490:12:490:12 | b | 4294967295 | +| test.c:490:17:490:17 | b | 4294967295 | +| test.c:491:16:491:16 | b | 23 | +| test.c:492:5:492:9 | total | 253 | +| test.c:492:14:492:14 | r | 253 | +| test.c:494:13:494:13 | b | 4294967295 | +| test.c:494:18:494:18 | b | 4294967295 | +| test.c:495:16:495:16 | b | 23 | +| test.c:496:5:496:9 | total | 506 | +| test.c:496:14:496:14 | r | 253 | +| test.c:499:10:499:14 | total | 759 | +| test.c:504:3:504:3 | x | 18446744073709551616 | +| test.c:504:7:504:7 | y | 18446744073709551616 | +| test.c:505:3:505:4 | xy | 18446744073709551616 | +| test.c:505:8:505:8 | x | 1000000003 | +| test.c:505:12:505:12 | y | 1000000003 | +| test.c:506:10:506:11 | xy | 1000000006000000000 | +| test.c:511:3:511:3 | x | 18446744073709551616 | +| test.c:512:3:512:3 | y | 18446744073709551616 | +| test.c:513:3:513:4 | xy | 18446744073709551616 | +| test.c:513:8:513:8 | x | 274177 | +| test.c:513:12:513:12 | y | 67280421310721 | +| test.c:514:10:514:11 | xy | 18446744073709551616 | +| test.c:518:7:518:8 | ui | 4294967295 | +| test.c:519:43:519:44 | ui | 4294967295 | +| test.c:519:48:519:49 | ui | 4294967295 | +| test.c:520:12:520:17 | result | 18446744065119617024 | +| test.c:522:7:522:8 | ul | 18446744073709551616 | +| test.c:523:28:523:29 | ul | 18446744073709551616 | +| test.c:523:33:523:34 | ul | 18446744073709551616 | +| test.c:524:12:524:17 | result | 18446744073709551616 | +| test.c:530:7:530:8 | ui | 4294967295 | +| test.c:530:19:530:20 | ui | 10 | +| test.c:531:5:531:6 | ui | 10 | +| test.c:531:11:531:12 | ui | 10 | +| test.c:532:12:532:13 | ui | 100 | +| test.c:536:3:536:9 | uiconst | 10 | +| test.c:539:3:539:9 | ulconst | 10 | +| test.c:540:10:540:16 | uiconst | 40 | +| test.c:540:20:540:26 | ulconst | 40 | +| test.c:544:7:544:7 | i | 2147483647 | +| test.c:544:18:544:18 | i | 2147483647 | +| test.c:545:5:545:5 | i | 2147483647 | +| test.c:545:13:545:13 | i | 2 | +| test.c:546:9:546:9 | i | 10 | +| test.c:548:5:548:5 | i | 2147483647 | +| test.c:548:9:548:9 | i | 10 | +| test.c:549:9:549:9 | i | 15 | +| test.c:551:5:551:5 | i | 15 | +| test.c:552:9:552:9 | i | 105 | +| test.c:554:5:554:5 | i | 105 | +| test.c:555:9:555:9 | i | 2310 | +| test.c:557:7:557:7 | i | 2147483647 | +| test.c:558:5:558:5 | i | 2147483647 | +| test.c:558:9:558:9 | i | -1 | +| test.c:559:9:559:9 | i | 1 | +| test.c:561:3:561:3 | i | 2147483647 | +| test.c:561:7:561:7 | i | 2147483647 | +| test.c:562:10:562:10 | i | 2147483647 | +| test.c:565:3:565:3 | i | 2147483647 | +| test.c:565:10:565:11 | sc | 1 | +| test.c:567:7:567:7 | i | 127 | +| test.c:574:7:574:7 | n | 4294967295 | +| test.c:576:7:576:7 | n | 4294967295 | +| test.c:577:9:577:9 | n | 4294967295 | +| test.c:580:7:580:7 | n | 4294967295 | +| test.c:581:9:581:9 | n | 4294967295 | +| test.c:583:9:583:9 | n | 0 | +| test.c:586:8:586:8 | n | 4294967295 | +| test.c:587:9:587:9 | n | 0 | +| test.c:589:9:589:9 | n | 4294967295 | +| test.c:592:10:592:10 | n | 4294967295 | +| test.c:593:5:593:5 | n | 4294967295 | +| test.c:596:7:596:7 | n | 0 | +| test.c:600:7:600:7 | n | 32767 | +| test.c:603:7:603:7 | n | 32767 | +| test.c:604:9:604:9 | n | 0 | +| test.c:606:9:606:9 | n | 32767 | +| test.c:609:7:609:7 | n | 32767 | +| test.c:610:9:610:9 | n | 32767 | +| test.c:612:9:612:9 | n | 0 | +| test.c:615:10:615:10 | n | 32767 | +| test.c:616:5:616:5 | n | 32767 | +| test.c:619:7:619:7 | n | 0 | +| test.c:623:7:623:7 | n | 32767 | +| test.c:624:9:624:9 | n | 32767 | +| test.c:625:11:625:11 | n | 32767 | | test.c:629:7:629:7 | n | 32767 | -| test.c:630:5:630:5 | n | 32767 | -| test.c:630:10:630:10 | n | 32767 | -| test.c:630:14:630:14 | n | 0 | -| test.c:631:6:631:6 | n | 32767 | -| test.c:631:10:631:10 | n | 0 | -| test.c:631:14:631:14 | n | 32767 | -| test.c:642:7:642:8 | ss | 32767 | -| test.c:643:9:643:10 | ss | 3 | -| test.c:646:7:646:8 | ss | 32767 | -| test.c:647:9:647:10 | ss | 32767 | -| test.c:650:14:650:15 | us | 65535 | -| test.c:651:9:651:10 | us | 32767 | -| test.c:654:14:654:15 | us | 65535 | -| test.c:655:9:655:10 | us | 65535 | -| test.c:658:7:658:8 | ss | 32767 | -| test.c:659:9:659:10 | ss | 32767 | -| test.c:662:7:662:8 | ss | 32767 | -| test.c:663:9:663:10 | ss | 2 | -| test.c:669:8:669:8 | s | 2147483647 | -| test.c:669:15:669:15 | s | 127 | -| test.c:669:23:669:23 | s | 9 | -| test.c:670:18:670:18 | s | 9 | -| test.c:670:22:670:22 | s | 9 | -| test.c:671:9:671:14 | result | 127 | -| test.c:677:7:677:7 | i | 0 | -| test.c:678:9:678:9 | i | 2147483647 | -| test.c:682:7:682:7 | u | 0 | -| test.c:683:9:683:9 | u | 4294967295 | -| test.c:688:12:688:12 | s | 2147483647 | -| test.c:689:7:689:8 | s2 | 4 | -| test.c:694:7:694:7 | x | 2147483647 | -| test.c:695:9:695:9 | y | 2147483647 | -| test.c:699:7:699:7 | y | 2147483647 | -| test.c:708:7:708:7 | x | 2147483647 | -| test.c:713:7:713:7 | x | 15 | -| test.c:720:8:720:8 | x | 2147483647 | -| test.c:720:12:720:12 | y | 256 | -| test.c:721:9:721:9 | x | 2147483647 | -| test.c:722:9:722:9 | y | 256 | +| test.c:630:13:630:13 | n | 32767 | +| test.c:633:9:633:9 | n | 32767 | +| test.c:636:7:636:7 | n | 32767 | +| test.c:636:22:636:22 | n | 32767 | +| test.c:637:9:637:9 | n | 32767 | +| test.c:640:7:640:7 | n | 32767 | +| test.c:641:5:641:5 | n | 32767 | +| test.c:641:10:641:10 | n | 32767 | +| test.c:641:14:641:14 | n | 0 | +| test.c:642:6:642:6 | n | 32767 | +| test.c:642:10:642:10 | n | 0 | +| test.c:642:14:642:14 | n | 32767 | +| test.c:653:7:653:8 | ss | 32767 | +| test.c:654:9:654:10 | ss | 3 | +| test.c:657:7:657:8 | ss | 32767 | +| test.c:658:9:658:10 | ss | 32767 | +| test.c:661:14:661:15 | us | 65535 | +| test.c:662:9:662:10 | us | 32767 | +| test.c:665:14:665:15 | us | 65535 | +| test.c:666:9:666:10 | us | 65535 | +| test.c:669:7:669:8 | ss | 32767 | +| test.c:670:9:670:10 | ss | 32767 | +| test.c:673:7:673:8 | ss | 32767 | +| test.c:674:9:674:10 | ss | 2 | +| test.c:680:8:680:8 | s | 2147483647 | +| test.c:680:15:680:15 | s | 127 | +| test.c:680:23:680:23 | s | 9 | +| test.c:681:18:681:18 | s | 9 | +| test.c:681:22:681:22 | s | 9 | +| test.c:682:9:682:14 | result | 127 | +| test.c:688:7:688:7 | i | 0 | +| test.c:689:9:689:9 | i | 2147483647 | +| test.c:693:7:693:7 | u | 0 | +| test.c:694:9:694:9 | u | 4294967295 | +| test.c:699:12:699:12 | s | 2147483647 | +| test.c:700:7:700:8 | s2 | 4 | +| test.c:705:7:705:7 | x | 2147483647 | +| test.c:706:9:706:9 | y | 2147483647 | +| test.c:710:7:710:7 | y | 2147483647 | +| test.c:719:7:719:7 | x | 2147483647 | +| test.c:724:7:724:7 | x | 15 | +| test.c:731:8:731:8 | x | 2147483647 | +| test.c:731:12:731:12 | y | 256 | +| test.c:732:9:732:9 | x | 2147483647 | +| test.c:733:9:733:9 | y | 256 | | test.cpp:10:7:10:7 | b | 2147483647 | | test.cpp:11:5:11:5 | x | 2147483647 | | test.cpp:13:10:13:10 | x | 2147483647 |