Skip to content
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

Refine float-integer casts in BaseInvariant #1632

Open
sim642 opened this issue Nov 26, 2024 · 0 comments
Open

Refine float-integer casts in BaseInvariant #1632

sim642 opened this issue Nov 26, 2024 · 0 comments
Labels
feature precision sv-comp SV-COMP (analyses, results), witnesses

Comments

@sim642
Copy link
Member

sim642 commented Nov 26, 2024

PR #1519 originally tried to handle this from SV-COMP:

int64_t data;
if (data > (-0x7fffffffffffffff - 1) && imaxabs((intmax_t)data) <= sqrtl(0x7fffffffffffffffLL))
{
int64_t result = data * data; // TODO NOWARN

The fix involved BaseInvariant refinement of float-integer casts in a possibly incorrect way, so it was reverted in #1519. However, it should still be possible to implement sound refinement of such casts.

@sim642 sim642 added feature sv-comp SV-COMP (analyses, results), witnesses precision labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature precision sv-comp SV-COMP (analyses, results), witnesses
Projects
None yet
Development

No branches or pull requests

1 participant