-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixpoint not reached because narrowing for Enums does not guarantee termination #1673
Comments
This seems the more obvious solution to me because it avoids non-program constants from getting into enums domain.
This creates a new tunable constant which affects analysis precision. So far the enums domain has been intended to not need that by not computing. With such collapse in place, that somewhat changes the idea because now it would also be fine to compute with enums. What I'm afraid of is the analysis of large switches over many enum constants. By fixing some default |
Note that this |
I think sv-benchmarks LDV tasks have a lot of large switches with all kinds of
If enum exclusion sets only get elements from negative guards and not computations/int domain refinement, then is there ever anything to narrow even? The enums domain is an interesting thing whose termination is not intended to follow purely from the domain ordering but also somehow from its abstract operations (which sounds like an interesting research in itself). If narrowing termination of exclusion sets is enforced by size, then the dual question of widening of inclusion sets also comes up: we just join inclusion sets, which doesn't fulfill ACC either. Either that also needs a bound or if there's a more clever semantic reason why widening terminates, then shouldn't that also apply to narrowing? |
@jerhard and I debugged one of the issues where fixpoint refinement does not terminate identified by our students in #1671 . It turns out the non-termination is due to infinite descending chains encountered during narrowing in the Enum domain after refining with Def_Exc.
In detail the following happens:
[1,infty]
and infers a value ofExc {0}
after the first incrementExc {1}
Exc {1}
Exc {0,2}
in Def_ExcExc {1,3}
Without refinement, these issues do not surface as:
The second point is why Enums gets away with setting narrow to meet: Without refinement the only values that can become part of the exclusion set are given by constants in the program. Such guarantees go away when performing refinement.
There are multiple solutions:
Exc {0}
for intervals that do not contain0
k
, and return the left argument during narrowing if it already hask
or more elements.@jerhard and I would propose to go for solution d).
The text was updated successfully, but these errors were encountered: