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 regarding abs in multi-objective optimization #7578

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

Correctness issue regarding abs in multi-objective optimization #7578

merlinsun opened this issue Mar 8, 2025 · 0 comments

Comments

@merlinsun
Copy link

Hi Nikolaj,

I’ve encountered an issue with Z3 c002c77.
For the following instance, when maximizing (abs (to_int a)) alongside another objective, Z3 returns an incorrect optimal value of 1 instead of the expected oo.

Minimal Example:

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

Output:

sat
(objectives
 (a (- 1))
 ((abs (to_int a)) 1)
)

Expected Behavior:

The issue only occurs when (maximize (abs (to_int a))) is combined with another objective like (maximize a). When (maximize a) is removed, Z3 correctly reports (abs (to_int a)) as oo.

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

Output (Correct):

sat
(objectives
 ((abs (to_int a)) oo)
)

Thanks for looking into this!

@merlinsun merlinsun changed the title Correctness issue regarding abs(to_int) in multi-objective optimization Correctness issue regarding abs in multi-objective optimization Mar 8, 2025
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