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

Handle sqrt & Some Bodged Solution for computing through abs #1254

Merged
merged 19 commits into from
Nov 21, 2023

Conversation

michael-schwarz
Copy link
Member

@michael-schwarz michael-schwarz commented Nov 18, 2023

This contains @stilscher's useful changes for computing sqrts for floats, plus some bodged together solution for refining through abs library functions we need for SV-COMP.

I propose to merge this for now and then replace it with @stilscher's cleaner solution once she finishes it.

References #1244 (and duplicates the working part of #1253).

@michael-schwarz michael-schwarz changed the title Handle sqrt & Some Botched Solution for computing through abs Handle sqrt & Some Bodged Solution for computing through abs Nov 18, 2023
@michael-schwarz michael-schwarz marked this pull request as ready for review November 18, 2023 11:53
tests/regression/39-signed-overflows/06-abs.c Show resolved Hide resolved
src/analyses/libraryFunctions.ml Outdated Show resolved Hide resolved
src/analyses/base.ml Show resolved Hide resolved
src/analyses/base.ml Outdated Show resolved Hide resolved
src/analyses/base.ml Outdated Show resolved Hide resolved
src/analyses/base.ml Outdated Show resolved Hide resolved
Copy link
Member

@sim642 sim642 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conflicts need to be resolved, but otherwise I suppose this seems ready.

@stilscher
Copy link
Member

Based on the latest run, I wanted to take another look at some test cases that use imaxabs. We cannot handle them yet, but simply adding imaxabs to the library functions does also not seem to work since there is a debug warning about an invariant failing.

@sim642
Copy link
Member

sim642 commented Nov 21, 2023

Since intmax_t is determined by some headers, maybe we cannot so statically know its ikind (if we can at all). It may be different from long long: https://stackoverflow.com/questions/20459513/is-intmax-t-the-same-as-long-long-int.

@michael-schwarz michael-schwarz merged commit e8b880e into master Nov 21, 2023
17 checks passed
@michael-schwarz michael-schwarz deleted the no-overflow-sqrt-pfusch branch November 21, 2023 12:27
sim642 added a commit to sim642/opam-repository that referenced this pull request Nov 24, 2023
nberth pushed a commit to nberth/opam-repository that referenced this pull request Jun 18, 2024
@sim642 sim642 mentioned this pull request Jun 20, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants