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

Correctness issue on multi-objective optimization #7569

Closed
merlinsun opened this issue Mar 1, 2025 · 0 comments
Closed

Correctness issue on multi-objective optimization #7569

merlinsun opened this issue Mar 1, 2025 · 0 comments

Comments

@merlinsun
Copy link

Hi Nikolaj,

I’ve noticed an issue with Z3’s handling of multi-objective optimization.
When maximizing an unconstrained variable b, Z3 cd95c7e returns an incorrect optimal value of (* (- 1) oo) instead of the expected oo.

Minimal Example:

(set-option :opt.priority box)
(declare-const a Real)
(declare-const b Real)
(assert (> 0 a))
(maximize a)
(maximize b)
(minimize (- a))
(check-sat)
(get-objectives)

Output:

sat
(objectives
 (a (- 1))
 (b (* (- 1) oo))
 ((- a) 1)
)

Additional Note: Removing (minimize (- a)) yields the correct result:

(set-option :opt.priority box)
(declare-const a Real)
(declare-const b Real)
(assert (> 0 a))
(maximize a)
(maximize b)
(check-sat)
(get-objectives)

Output:

sat
(objectives
 (a (- 1))
 (b oo)
)

Thanks for looking into this!

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

No branches or pull requests

1 participant