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 support for Z3 minimization/maximization #188

Open
RyanGlScott opened this issue Feb 17, 2022 · 0 comments
Open

Add support for Z3 minimization/maximization #188

RyanGlScott opened this issue Feb 17, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@RyanGlScott
Copy link
Contributor

Z3 supports (minimize ...) and (maximize ...) commands, as illustrated in this example. As far as I am aware, Z3 is the only solver that supports something like this at the moment, as other solvers would have to approximate this functionality with something like resolveBoundsSymBV (see #187). In fact, resolveBoundsSymBV is exactly why I'm opening this issue, as the test cases that I added for it run noticeably slower on Z3 than on, say, Yices or CVC4 (at least a couple of seconds slower). I'm wondering if using minimize/maximize could make things faster on Z3.

I'm imagining the API would look something like:

minimize, maximize :: SMTWriter h => WriterConn t h -> Expr t tp -> IO ()

This would need to be guarded behind a problem feature of some sort. SBV already supports something like this here.

@RyanGlScott RyanGlScott added the enhancement New feature or request label Feb 17, 2022
RyanGlScott added a commit that referenced this issue Feb 17, 2022
@RyanGlScott RyanGlScott changed the title Add support for Z3 minimization/maximiation Add support for Z3 minimization/maximization Feb 17, 2022
RyanGlScott added a commit that referenced this issue Feb 17, 2022
RyanGlScott added a commit that referenced this issue Feb 17, 2022
RyanGlScott added a commit that referenced this issue Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant