-
Notifications
You must be signed in to change notification settings - Fork 62
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
SBV error: invalid function declaration reference, unknown function -1 AND w4 error: arithmetic underflow #1768
Labels
type: bug
Issues reporting bugs or unexpected/unwanted behavior
Comments
RyanGlScott
added
the
type: bug
Issues reporting bugs or unexpected/unwanted behavior
label
Dec 1, 2022
RyanGlScott
added a commit
that referenced
this issue
Dec 3, 2022
When calling `atWithDefault n d v i`, `d` should be returned if `i` is less than `n`. `atWithDefault` is implemented as a primitive, so we must ensure that this is done in `saw-core`'s `atWithDefaultOp` function. While `atWithDefaultOp` was handling this correctly for generic infinite sequences, it was _not_ correctly handling the special case of infinite bit sequences. This led to the issues reported in #1768. This patch fixes #1768 by introducing a `bpBvAtWithDefault` combinator that implements the defaulting behavior above in terms of `bpBvAt`. I've added a test case to demonstrate that the test case from #1768 now works as expected.
RyanGlScott
added a commit
that referenced
this issue
Dec 3, 2022
When calling `atWithDefault n d v i`, `d` should be returned if `i` is greater than or equal to `n`. `atWithDefault` is implemented as a primitive, so we must ensure that this is done in `saw-core`'s `atWithDefaultOp` function. While `atWithDefaultOp` was handling this correctly for generic infinite sequences, it was _not_ correctly handling the special case of infinite bit sequences. This led to the issues reported in #1768. This patch fixes #1768 by introducing a `bpBvAtWithDefault` combinator that implements the defaulting behavior above in terms of `bpBvAt`. I've added a test case to demonstrate that the test case from #1768 now works as expected.
Good catch! It turns out that |
RyanGlScott
added a commit
that referenced
this issue
Dec 6, 2022
When calling `atWithDefault n d v i`, `d` should be returned if `i` is greater than or equal to `n`. `atWithDefault` is implemented as a primitive, so we must ensure that this is done in `saw-core`'s `atWithDefaultOp` function. While `atWithDefaultOp` was handling this correctly for generic infinite sequences, it was _not_ correctly handling the special case of infinite bit sequences. This led to the issues reported in #1768. This patch fixes #1768 by introducing a `bpBvAtWithDefault` combinator that implements the defaulting behavior above in terms of `bpBvAt`. I've added a test case to demonstrate that the test case from #1768 now works as expected.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's a simple Cryptol function that causes some issues w/ SAW.
Everything works correctly within Cryptol...
But when we get to saw we get some errors with both the SBV and what4 backends.
SBV:
what4:
The text was updated successfully, but these errors were encountered: