goto-model validation: Validate constant_exprt#6786
Merged
kroening merged 2 commits intodiffblue:developfrom Apr 11, 2022
Merged
goto-model validation: Validate constant_exprt#6786kroening merged 2 commits intodiffblue:developfrom
kroening merged 2 commits intodiffblue:developfrom
Conversation
6362898 to
d5ccfcd
Compare
Collaborator
|
While at it, we should also check that there are no leading zeros. |
Collaborator
|
Oh, and we need to stick to either 'A'-'F' or 'a'-'f', but shouldn't allow both. |
d5ccfcd to
d1c2c0e
Compare
Collaborator
Author
Done! |
Collaborator
Author
Oh, that would indeed just cause the same sort of trouble. Check is now more constrained. |
We silently accept, and sometimes handle correctly, bitvector constants that are encoded as -[absolute value] instead of two's complement. The simplifier, however, will not handle this ambiguity as equalities over constants are evaluated by comparing the value strings. Therefore, use goto-model validation to ensure we do not process bitvector constants that don't use two's complement encoding. Fixes: diffblue#6759
The code was almost there, but was never triggered.
d1c2c0e to
9c12e0f
Compare
Codecov Report
@@ Coverage Diff @@
## develop #6786 +/- ##
===========================================
+ Coverage 76.90% 76.98% +0.07%
===========================================
Files 1590 1593 +3
Lines 183969 184145 +176
===========================================
+ Hits 141486 141755 +269
+ Misses 42483 42390 -93
Continue to review full report at Codecov.
|
kroening
approved these changes
Apr 11, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
We silently accept, and sometimes handle correctly, bitvector constants
that are encoded as -[absolute value] instead of two's complement. The
simplifier, however, will not handle this ambiguity as equalities over
constants are evaluated by comparing the value strings. Therefore, use
goto-model validation to ensure we do not process bitvector constants
that don't use two's complement encoding.
Fixes: #6759