Skip to content
Snippets Groups Projects
Commit d65de284 authored by David Bühler's avatar David Bühler
Browse files

[Eva] Improves widenings on nested loops.

On nested loops, for each iteration of the outer loop, postpone the widening of
the inner loop of [delay] iterations, [delay] being set by -eva-widening-delay.

Example:

while (i < n) {
  j = 0;
  while (j < 100) { j++; }
  i++;
}

On such nested loops, the fixpoint of the inner loop is independent from the
outer loop.

At the first iteration of the outer loop, a fixpoint is reached for the inner
loop. For other iterations of the outer loop, only one iteration of the inner
loop is needed to reach a new fixpoint, by only updating the variables modified
by the outer loop (i here). Avoiding widening during this one iteration is
crucial for precision, as the widening of the inner loop would widen the
variable i, leading to an overflow alarm at i++.
parent b6652e6b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment