-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implemented missing methods to the C++ API #5242
Conversation
Signed-off-by: Mikhail R. Gadelha <mikhail.ramalho@gmail.com>
Signed-off-by: Mikhail R. Gadelha <mikhail.ramalho@gmail.com>
Signed-off-by: Mikhail R. Gadelha <mikhail.ramalho@gmail.com>
Signed-off-by: Mikhail R. Gadelha <mikhail.ramalho@gmail.com>
Signed-off-by: Mikhail R. Gadelha <mikhail.ramalho@gmail.com>
Signed-off-by: Mikhail R. Gadelha <mikhail.ramalho@gmail.com>
Signed-off-by: Mikhail R. Gadelha <mikhail.ramalho@gmail.com>
I still have a couple of methods that I want in the C++ API but I'm not sure how to implement them properly:
There is My question is here is that The documentation states that it is indeed returning a sort |
Thanks for pointing out these issues! Those definitions in the C++ API are indeed wrong. As you suggest,
Please go ahead and add those fixes, I'm happy to take another look at this PR or answer more questions after that! |
…er#4673) Signed-off-by: Mikhail R. Gadelha <mikhail.ramalho@gmail.com>
Signed-off-by: Mikhail R. Gadelha <mikhail.ramalho@gmail.com>
I'm not a fan either, especially because you have to set the rounding mode for every operation in SMT... BUT it follows what most programming languages expect you to do, right? Either you explicitly set the rounding mode before the operation(s) or you go with what is already set.
Cool, I've just updated the PR. I removed |
@wintersteiger I am under the impression that you would comment on this and merge when ready.
|
Yep, that all looks good to me, many thanks for cleaning this up! |
@NikolajBjorner the logs of the failed CI builds are not available anymore. Are those expected and be ignored? |
Seems build retention timeout was met. Since change is to add new code mostly and the main breaking change is rounding mode, which is discussed above, I will merge. |
Also, I couldn't successfully restart the failed builds. Probably because of retention. As there is no obvious way to start a new build I merged. |
Yes, I saw that too. You can manually submit jobs in the pipeline UI, but I forgot why that didn't work for me last week (maybe permission problems, SC-alt accounts etc). |
The build failures were due to breaks in Julia bindings. I ended up addressing one of the issues by removing the method that broke from Julia. I am not familiar with the use case for floating points from Julia bindings and guessing that it is very low opted for this approach to move forward. |
(inspired by PR #5234)
I've added the following methods to the C++ API:
std::ostream & operator<<(std::ostream & out, sort const & s)
to print sortsmk_is_normal
checks if a fp is normalmk_is_subnormal
checks if a fp is subnormalmk_is_zero
checks if a fp is zerosbv_to_fpa
converts from signed bv to fpubv_to_fpa
converts from unsigned bv to fpfpa_to_fpa
converts from fp to fpround_fpa_to_closest_integer
rounds fp to closest fpmk_from_ieee_bv
converts from bv (in IEEE format) to fpbvredor
calls bv reductionor
bvredand
calls bv reductionand
fp_eq
callsfp.eq
fpa_nan
creates a fp NaNfpa_inf
creates a fp +/-inf