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

HolSmt: add some support for tuples and for the reals' min, max and abs #1187

Merged
merged 2 commits into from
Jan 26, 2024

Conversation

someplaceguy
Copy link
Contributor

@someplaceguy someplaceguy commented Jan 25, 2024

This is just a couple of minor improvements to allow some more HolSmt self-tests to be enabled and ensure that we don't regress on future improvements. In total, 21 more tests were enabled for cvc5 and Z3, including Z3 with proof reconstruction (although no proof reconstruction improvements were made).

It basically rewrites goals containing some terms not available in SMT-LIB into something SMT provers can understand, by simplifying using existing theorems. However, I think that in the future, a better solution would be for HolSmt to try to find the most appropriate theorems (based on the terms it finds in the assumptions and goal) and translate those theorems to SMT-LIB, so that SMT solvers can reason about them. This would allow solving more goals.

This will be especially important for function definitions, which currently are simply converted into uninterpreted symbols (thus functions are completely opaque to SMT solvers, leading to the impossibility of solving most goals containing them).

I think this concludes my low-hanging fruit improvements for HolSmt, for now. I think there's more that could be done (e.g. fix integer div and mod) but I think that could be done better if/when the work mentioned above is done first.

For now I'd like to focus on trying to add support for proof reconstruction for the most recent version of Z3, which I expect to be a hard and lengthy endeavor, so I don't expect to send PRs any time soon...

Thanks!

Hopefully this is a temporary stop-gap measure until a more general mechanism
is implemented to identify an appropriate definition that can be sent to the
SMT solvers, rather than special-casing each and every definition.

That said, this is still useful, especially so that we can enable some of the
already-existing self-tests for the SMT-LIB translation as well, to detect
future regressions whenever improvements are made.

The enabled self-tests all include Z3 with proof reconstruction now.
Again, this is a temporary stop-gap measure until we can translate function
definitions to SMT-LIB format, so that SMT solvers can reason about them.

As it is, due to the above limitation this won't be able to solve some goals
(witness the two disabled tests) but it does allow solving the simpler ones.

Of the tests that were enabled, all work with Z3 proof reconstruction.
@mn200
Copy link
Member

mn200 commented Jan 26, 2024

Fantastic; thanks!

@mn200 mn200 merged commit 5eb0e7b into HOL-Theorem-Prover:develop Jan 26, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants