-
Notifications
You must be signed in to change notification settings - Fork 277
Add support for incremental SMT traces containing C_bool #6628
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
Conversation
38c8b73
to
5a5bd84
Compare
Codecov Report
@@ Coverage Diff @@
## develop #6628 +/- ##
========================================
Coverage 76.64% 76.65%
========================================
Files 1579 1580 +1
Lines 181487 181560 +73
========================================
+ Hits 139109 139168 +59
- Misses 42378 42392 +14
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It would have been prettier to have split commits for parts that are different (e.g. refactor, code reorder, tests), but for a PR this small it's fine.
5a5bd84
to
a9f78e6
Compare
int x, y; | ||
bool equal = x == y; | ||
__CPROVER_assert(equal, "Assert of integer equality."); | ||
__CPROVER_assert(!equal, "Assert of not integer equality."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️ What does not integer equality
mean? Do you mean inequality
in this context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean the not operator is being applied to the result of testing for integer equality. This is equivalent to testing for inequality with the !=
operator, so the distinction is not really important here. The main purpose of this assertion is to ensure that the output traces include instances where equal is assigned a true value and equal is assigned a false value.
An "unsupported type" invariant violation would previously have been encountered when attempting to generate traces featuring `c_bool_typet`. This is due to `c_bool_typet` not being castable to `integer_bitvector_typet`.
The following commit is adding an include which will cause the updated version of clang-format to re-order the includes. Doing the reorder in advance will make it clear which include is added.
a9f78e6
to
a638644
Compare
An "unsupported type" invariant violation would previously have been
encountered when attempting to generate traces featuring
c_bool_typet
.This is due to
c_bool_typet
not being castable tointeger_bitvector_typet
.