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

Unsoundness in elim-uncnstr2 #6506

Closed
nunoplopes opened this issue Dec 23, 2022 · 0 comments
Closed

Unsoundness in elim-uncnstr2 #6506

nunoplopes opened this issue Dec 23, 2022 · 0 comments

Comments

@nunoplopes
Copy link
Collaborator

(declare-fun undef!34 () (_ BitVec 32))
(declare-fun |np_%y#2| () Bool)
(declare-fun undef!35 () (_ BitVec 32))
(declare-fun undef!39 () (_ BitVec 32))
(declare-fun |%y#3| () (_ BitVec 32))
(declare-fun |isundef_%y#3| () (_ BitVec 1))
(declare-fun |%y#1| () (_ BitVec 32))
(declare-fun |%y#2| () (_ BitVec 32))
(declare-fun |%x#0| () (_ BitVec 32))

(assert (forall ((undef!4 (_ BitVec 32))
                     (undef!9 (_ BitVec 32))
                     (undef!14 (_ BitVec 32))
                     (undef!19 (_ BitVec 32))
                     (undef!31 (_ BitVec 32)))
              (let ((a!1 (or |np_%y#2|
                                (not (bvsle |%y#1| undef!9))
                                (not (bvsle undef!4 |%x#0|))))
                       (a!3 (not (bvsle (ite (= |isundef_%y#3| #b0) |%y#3| undef!31)
                                        undef!19)))
                       (a!5 (ite (bvsle (ite (= |isundef_%y#3| #b0) |%y#3| undef!39)
                                        undef!35)
                                 #b0
                                 #b1))
                       (a!6 (ite (bvsle |%y#2| undef!34) #b0 #b1)))
                 (let ((a!4 (ite (or a!3 (not (bvsle |%y#2| undef!14))) #b1 #b0)))
                   (not (or (not a!1) (= a!4 (bvor a!5 a!6))))))))

(check-sat-using (then elim-uncnstr2 smt))
(check-sat)

prints:

sat
unsat
NikolajBjorner added a commit that referenced this issue Dec 26, 2022
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
hgvk94 pushed a commit to hgvk94/z3 that referenced this issue Mar 27, 2023
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
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