-
Notifications
You must be signed in to change notification settings - Fork 277
Introduce floatbv_rounding_mode(unsigned) #6288
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
src/util/floatbv_expr.cpp
Outdated
// the 32 bits are an arbitrary choice | ||
return ::from_integer(rm, unsignedbv_typet(32)); |
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.
Shouldn't the comment also clarify that the type needs to be the same as that of the Edit: no, it doesn't matter, __CPROVER_rounding_mode
symbol (which, actually, seems to be a signed int)?float_utilst::set_rounding_mode
will create constants of the appropriate size.
cb3a930
to
f1bf2e6
Compare
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'd prefer using an integer of minimal size of a fixed-32-bits one, but likely this won't matter much.
@kroening I believe tests would pass after a rebase. |
This introduces a function to produce the constant expression that is consumed by the floatbv_* expressions as the rounding mode. Using this function in ieee_floatt removes the dependency on c_types.h.
f1bf2e6
to
bd9520c
Compare
Codecov Report
@@ Coverage Diff @@
## develop #6288 +/- ##
===========================================
- Coverage 75.97% 75.97% -0.01%
===========================================
Files 1508 1509 +1
Lines 163380 163381 +1
===========================================
- Hits 124131 124130 -1
- Misses 39249 39251 +2
Continue to review full report at Codecov.
|
This introduces a function to produce the constant expression that is
consumed by the floatbv_* expressions as the rounding mode.
Using this function in
ieee_floatt
removes the dependency on c_types.h.