When analyzing an if statement such as

if (x < y) {

…

}

the static analyzer will constrain the value of x or y appropriately in the true branch when the value of the other is known at the time of the condition. For example, if the range of values for x is [8, 8] and the range of values for y is [1, 64] before the if statement, then in the true branch the range for y will be [9, 64].

However, when the value of both variables is unknown, nothing is done. It seems like it would not be difficult to restrict the ranges for the variables. For example, if the range of values for x is [8, 100] and the range of values for y is [1, 64] before the if statement, then in the true branch the range for x should be [8, 63] and the range for y should be [9, 64].

Is there any reason not to restrict the ranges in this way?

Ray