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

Update CVC5 to 1.2.X #454

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

daniel-raffler
Copy link
Contributor

Hello everyone,
this PR will update CVC5 to the latest version and rewrites the solver backend to use the new TermManager interface. It also changes the build process so that only a single library is produced and all dependencies are statically linked. In addition we added multi-arch support for linux on arm64 and windows on x64.

There were some issues in CVC5 that had to be fixed and we're still waiting on cvc5/cvc5#11730 before this can be merged.

@daniel-raffler daniel-raffler linked an issue Mar 17, 2025 that may be closed by this pull request
@daniel-raffler
Copy link
Contributor Author

@kfriedberger: Could you have a look at the last commit that adds multi-arch support? I've tried it for arm64 with qemu, but I don't have a windows machine to test the binaries. (You'll have to use the repository from the CVC5 pull request here if you want to build the binaries yourself)

@kfriedberger kfriedberger self-requested a review March 17, 2025 06:28
@daniel-raffler daniel-raffler marked this pull request as ready for review March 18, 2025 18:26
@daniel-raffler
Copy link
Contributor Author

The missing pull request for CVC5 has now been merged and we can build from main

We compile for linux on x64 and arm64 and windows on x64 only. CVC5 is also available on MacOS, but there doesn't seem to be a simple way to cross compile. The same is true for windows on arm64.
@daniel-raffler daniel-raffler force-pushed the 410-update-cvc5-to-version-120-or-newer branch from 16fdcb2 to 2abc14d Compare March 19, 2025 21:47
This reverts commit 458b8f1 and blacklists one more test. CVC5 still crashes when formulas are shared across multiple threads. Remember to reapply this commit once the issue has been solved upstream.
@daniel-raffler daniel-raffler changed the title Draft: Update CVC5 to 1.2.X Update CVC5 to 1.2.X Mar 19, 2025
Copy link
Member

@kfriedberger kfriedberger left a comment

Choose a reason for hiding this comment

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

On first look, this is an impressive PR, and it looks quite good:

  • version update of CVC5 ✔️
  • arm64-support for CVC5 ✔️
  • x64-support for WIndows ❔ (does not yet work)

I will test compilation and different OS soon.

@baierd
Copy link
Collaborator

baierd commented Mar 23, 2025

The proof generation/traversal API has changed compared to older versions. Do we include the new API and maybe even a native test for it?

If not, can we add that in this PR? It would be helpful for @gcarpio21 s proof interface.
(I can also do it, but probably in the later half of next week)

@kfriedberger
Copy link
Member

We compile the "full" API of CVC5, including all new features. I assume that the API changes from your comment refer to plain Java API. This should be done outside of this PR, as it might be independent of native code and low-level bindings. A separate PR would also allow to integrate this PR here soonish, and work on proofs later.

@gcarpio21
Copy link
Member

The proof generation/traversal API has changed compared to older versions. Do we include the new API and maybe even a native test for it?

If not, can we add that in this PR? It would be helpful for @gcarpio21 s proof interface. (I can also do it, but probably in the later half of next week)

For the purposes of correctly retrieving proofs from CVC5 I have written a test in the CVC5NativeAPITest class using some of the methods exposed in this version of CVC5 to handle proofs. I could add the test to this PR.

@kfriedberger
Copy link
Member

If there is just one additional test, then feel free to add it within this PR.

@kfriedberger
Copy link
Member

Update for the Windows build artifact:
There are remaining non-static dependencies to GCC-specific libraries. CVC5 packages them as additional libraries into the released archive:
https://github.com/cvc5/cvc5/blob/7bf5d3e457aa5c40b325b0e687de5a972b0dad4e/.github/actions/add-package/action.yml#L40-L42
We can do the same, and add those dependencies into Ivy and Maven. We would need to load those libraries before loading CVC5.

Alternative (maybe future work, not part of this PR):
CVC5 has already a fully running build-system that publishes (nearly) static binaries for more platforms (see https://github.com/cvc5/cvc5/releases ). For other solvers, like Z3, we use the direct release instead of building our own binaries. This would only require to download several archives, and then repackage them according to our needs. This might allow us to even support MacOS on x64 and arm64 platform without any compilation overhead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

Update CVC5 to version 1.2.0 or newer
4 participants