HolSmt: add support for the cvc5 SMT solver + doc update #1173
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for the cvc5 SMT solver. It also updates HolSmt's documentation and enables more tests for the Z3 SMT solver.
It is split into 4 commits:
x=-127
andy=127
counterexample, which I subsequently verified purely in HOL4 just to be sure.This minor fix to these two tests was put into a separate commit for two reasons: 1) it's independent of the other improvements/commits, and 2) just to make sure that this reversal in the expected behavior wasn't lost in the noise.
The only very minor issue was that cvc5 printed out a warning that performance will not be optimal if a specific logic was not specified. To avoid this warning, I modified HolSmt to prepend a
(set-logic <logic>)
command to the generated file.Currently, and just like before this PR, no attempt is being made to determine what is the optimal logic for a query. Instead, Z3 passes
NONE
(which instructsSmtLib.sml
to not generate aset-logic
command) and cvc5 passesSOME "ALL"
in order to generate a(set-logic ALL)
command, as that is what cvc5 suggests should be done in this case.The
HOL4_CVC_EXECUTABLE
environment variable is used to find thecvc5
executable, following the same pattern as for the other SMT solvers.Note: I don't know what are the build commands to generate the documentation PDFs since (ironically) I couldn't find documentation for that. I also have zero LaTeX experience, so I have no idea if the changes I've made to the documentation are correct or how they actually look in rendered form.
There are a couple of related questions that I haven't dealt with (at least, not yet):
More importantly, I wonder if support for cvc5 should also be added to the CI pipeline (assuming it exists?). In theory, all that's needed is to install cvc5 and set the
HOL4_CVC_EXECUTABLE
environment variable to point to it.I know that Z3 (and I believe cvc5 as well) support deterministic queries, by setting a specific random seed and by setting the search limit to be a specific number of steps rather than a time limit.
However, HolSmt currently does not attempt to do this at all, so I'm guessing that SMT solvers default to using a random seed and running with a time limit as the criteria for giving up when the query is too difficult.
Given that, I wonder if anyone has experienced HolSmt tests to fail occasionally, due to the non-deterministic nature of these time limits and random seeds or if this hasn't been an issue at all?