-
Notifications
You must be signed in to change notification settings - Fork 100
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
powif64 intrinsic is not currently supported by Kani #2763
Comments
Thanks @acgetchell for the feature request. @adpaco-aws I see that the support for |
No, I'm not aware of any checks. I believe that testing correctness, and maybe check what's the output for |
It seems that CBMC is missing the power functions, e.g.
@tautschnig are these not supported in CBMC? I tried |
Yes, CBMC does not ship library models for these: it’s not obvious how to come up with an implementation that works without doing a series of multiplications. Doing those would likely have prohibitive cost. |
I see. Would it make sense to use an over-approximating model that bails out and returns non-det in some cases (e.g. similar to @acgetchell as far as I could see, the code only uses https://github.com/acgetchell/cdt-rs/blob/main/src/triangulation.rs#L32 If this is the case, a workaround would be to replace the |
It seems there actually are efficient approximations, though we'd have to be careful how we could argue soundness. See https://schraudolph.org/pubs/Schraudolph99.pdf and https://martin.ankerl.com/2007/10/04/optimized-pow-approximation-for-java-and-c-c/. |
diffblue/cbmc#7906 proposes to add these approximations to CBMC. |
Nice, thanks! |
CBMC provides approximating implementations of these. Resolves: model-checking#2763, model-checking#2966
These are supported by CBMC with diffblue/cbmc#8192 merged. Resolves: model-checking#2763
Requested feature:
Support
powif64
.Use case:
https://github.com/acgetchell/cdt-rs/blob/main/src/lib.rs#L161
Test case:
https://github.com/acgetchell/cdt-rs/actions/runs/6180157100/job/16776172095#step:3:4374
The text was updated successfully, but these errors were encountered: