-
Notifications
You must be signed in to change notification settings - Fork 123
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
check if what4 adapter is present before setting timeout #1809
Conversation
src/Cryptol/Symbolic/What4.hs
Outdated
do symCfg cfg sym "Z3" W4.z3Timeout (1000 * s) | ||
symCfg cfg sym "CVC4" W4.cvc4Timeout (1000 * s) | ||
symCfg cfg sym "CVC5" W4.cvc5Timeout (1000 * s) | ||
symCfg cfg sym "Boolector" W4.boolectorTimeout (1000 * s) | ||
symCfg cfg sym "Yices" W4.yicesGoalTimeout s -- N.B. yices takes seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having to enumerate all of the solvers and their timeout options, I wonder if we should do the following:
- Add a new field to
AnOnlineAdapter
(of typeConfigOption BaseIntegerType
) to represent the timeout option for a particular solver. - In
setTimeout
, match oncfg
and apply the timeout option for each solver that is contained in theW4ProverConfig
.
This approach has the advantage that we wouldn't need to remember to keep the implementation of this function in sync whenever Cryptol adds support for a new SMT solver. (In fact, I suspect that this function is already out of sync, since this function doesn't mention the recently-added Bitwuzla solver anywhere.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me, although I think we'll need an auxiliary config option for yices to account for the second/millisecond discrepancy vs. the rest of the solvers.
Are you able to reproduce this test failure from CI locally? If so, do you know what might be causing it?
(I do not use macOS, so I am unable to reproduce it myself.) |
I've seen this before and it's definitely an issue with What4 itself. It's highly nondeterministic from what I can tell. I'll see if I can reproduce it on an up to date What4 build and raise a corresponding issue there. I believe it's limited to the cvc solvers, so we can remove those from the test for now. |
b7d35ed
to
92ae8b7
Compare
92ae8b7
to
ad4a5b8
Compare
Currently failing as a result of GaloisInc/what4-solvers#58. Should work with an updated build of yices. |
I've published a new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hooray! That appears to have fixed it!
As always, please make sure to mention this bug fix in the changelog. Otherwise, LGTM.
This snapshot includes a fix for GaloisInc/what4-solvers#58, which was causing the CI to fail.
7aefb95
to
1ffdd34
Compare
1ffdd34
to
5e57fd9
Compare
fixes #1807