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

Add z3new as solver type command line flag, which sets sat.smt=true. #741

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cp526
Copy link
Collaborator

@cp526 cp526 commented Dec 6, 2024

Due to some previous Z3 bug, this will only work for versions newer than the as yet unpublished 4.13.4.

Even than, this flag does not currently work correctly due to some change in the z3-produced SMT models.

Due to some previous Z3 bug, this will only work for versions newer
than the as yet unpublished 4.13.4.

Even than, this flag does not currently work correctly due to some
change in the z3-produced SMT models.
@dc-mak dc-mak added cn solver Related to the SMT solver backend labels Dec 6, 2024
Copy link
Collaborator

@yav yav left a comment

Choose a reason for hiding this comment

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

I am not sure if adding Z3new to solver_extensions is the right approach for this. The idea with solver_extensions was to help us handle SMT translations that differ between the solvers (i.e., things outside the SMTLIB standard).

It looks like here we just want to initialize the solver in a different way, rather than change how things are translated.

An alternative I'd suggest is perhaps to add another option to the solver, I guess for now it could be a boolean flag, and when creating the solver we can use either SMT.z3 or SMT.z3new depending on the flag.

Longer run, I think a better design might be to remove the global flags and instead pass them as parameters to make.

@cp526
Copy link
Collaborator Author

cp526 commented Dec 6, 2024

I am not sure if adding Z3new to solver_extensions is the right approach for this. The idea with solver_extensions was to help us handle SMT translations that differ between the solvers (i.e., things outside the SMTLIB standard).

It looks like here we just want to initialize the solver in a different way, rather than change how things are translated.

An alternative I'd suggest is perhaps to add another option to the solver, I guess for now it could be a boolean flag, and when creating the solver we can use either SMT.z3 or SMT.z3new depending on the flag.

Longer run, I think a better design might be to remove the global flags and instead pass them as parameters to make.

Thanks!

Agreed. This is more a short-term experiment, to see if the sat.smt option can be made to work. In the longer term we may not want this parameter at all, but either discard it (if it doesn't help) or make it the default (if it does).

Running the above code with z3 nightly and z3new on I see line

raise (UnexpectedSolverResponse ans) (* recursive *)
raising an exception. Does this mean z3 generates a model with recursive definitions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cn solver Related to the SMT solver backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants