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

Use Z3 in parallel mode #2315

Closed
rnbguy opened this issue Dec 8, 2022 · 3 comments · Fixed by #2990
Closed

Use Z3 in parallel mode #2315

rnbguy opened this issue Dec 8, 2022 · 3 comments · Fixed by #2990
Labels
feature A new feature or functionality

Comments

@rnbguy
Copy link
Contributor

rnbguy commented Dec 8, 2022

Is your feature request related to a problem? Please describe

It would be nice to expose some z3 configuration at Apalache CLI.

For one, I want to run z3 in parallel mode. This can be done via setting parallel.enable to true.

Describe the solution you'd like

This can be exposed via --tuning-options.

Eg. apalache-mc simulate --tuning-options=search.solver.z3.parallel.enable=true ...

Describe the impact on your work

Faster z3 search on multi-core machines.

@rnbguy rnbguy added the feature A new feature or functionality label Dec 8, 2022
@thpani
Copy link
Collaborator

thpani commented Dec 12, 2022

Hi Rano, thanks for bringing this up!

Do you have any evidence that we could benefit from parallel Z3 solving?

Last time I checked, Z3's parallel support was limited to a few theories (bitvectors, iirc).
Also at SMT-COMP 2021, at least for QF_Equality+(Non)LinearArith all solvers seemd to run sequentially:

@rnbguy
Copy link
Contributor Author

rnbguy commented Dec 12, 2022

My SMT knowledge is very rusty 😅 I do not know the details of z3 parallel support. Not sure I can come up with an example in TLA+ that gets transformed into the supported theories.

If you think Apalache doesn't use these theories, you can put this feature request in the backlog.

@konnov
Copy link
Collaborator

konnov commented Sep 18, 2024

This should be possible now with #2990. Actually, I only manage to activate z3.sat.threads = 8. The other parallelization flags are working with the z3 CLI, but not with the Java API. Perhaps, they only work for specific logics or solver modes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature or functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants