-
Notifications
You must be signed in to change notification settings - Fork 274
Regression tests for Bitwise Operators Conversion in new SMT backend #6694
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
Regression tests for Bitwise Operators Conversion in new SMT backend #6694
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #6694 +/- ##
===========================================
+ Coverage 76.92% 77.15% +0.22%
===========================================
Files 1583 1582 -1
Lines 183314 182628 -686
===========================================
- Hits 141018 140900 -118
+ Misses 42296 41728 -568
Continue to review full report at Codecov.
|
a7b757b
to
6f008ab
Compare
b263369
to
bc2f6a2
Compare
regression/cbmc-incr-smt2/bitvector-bitwise-operators/bitwise_ops.c
Outdated
Show resolved
Hide resolved
regression/cbmc-incr-smt2/bitvector-bitwise-operators/shift_right.c
Outdated
Show resolved
Hide resolved
^SIGNAL=0$ | ||
-- | ||
-- | ||
The assertions in the C file for this test are designed to be satisfiable, |
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.
If they are satisfied then why are the regexes checking for failure? Or do you mean than we expect a sat
response back from the solver, thus leading to a verification failure?
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.
Sorry, you're right, the wording is not ideal.
When I wrote this I had in mind the terminology from logic "the expression is satisfiable", which means that there's at least one model within the structure that satisfies the expression.
I'll reword this.
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.
Your current working still doesn't make sense to me. Your regexes are now looking for SUCCESS. So surely the solver will return unsat
and there will be no counter examples found?
regression/cbmc-incr-smt2/bitvector-bitwise-operators/shift_right.c
Outdated
Show resolved
Hide resolved
regression/cbmc-incr-smt2/bitvector-bitwise-operators/shift_right.c
Outdated
Show resolved
Hide resolved
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.
Added thumbsup on some of @thomasspriggs comments. Also the more general comment that "satisfiable" is often not clear from context and can be misleading.
bc2f6a2
to
916ba10
Compare
916ba10
to
4b8b8b5
Compare
regression/cbmc-incr-smt2/bitvector-bitwise-operators/shift_right.c
Outdated
Show resolved
Hide resolved
4b8b8b5
to
59fd2af
Compare
\[main\.assertion\.1\] line \d+ Right shifting a uint with leftmost bit set is a logical shift: FAILURE | ||
\[main\.assertion\.2\] line \d+ Right shifting a positive number has a lower bound of 0: SUCCESS | ||
\[main\.assertion\.3\] line \d+ Right shifting a negative number has a lower bound value of -1: SUCCESS | ||
result_unsigned=64 |
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 think you should also be able to include a regex to check that second
is assigned the value 128 in the trace.
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.
Incoming.
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.
Done.
59fd2af
to
0e2d0ef
Compare
This PR adds regression tests for the work done in #6676 .