Fix enums domain to not emit witness invariants for top booleans #1436
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is related to a point in #1356.
The SV-COMP autotuner can enable the enums domain, which emitted invariants like
x == (_Bool)0 || x == (_Bool)1for_Boolvariables with top value. These are pointless because they match the type bounds (although indirectly), so we should avoid emitting them as we do in other domains and for other types.This is because the enums domain normalizes top booleans to
Inc {0, 1}, which then needs to be handled separately forinvariant_ikind. In other cases, we can output some bounds usingExcranges of enums, just like we do with the def_exc domain, although they're quite likely to match and get deduplicated for witness generation.