-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Weird array quantification behavior -- smallest example #6575
Comments
I think there are some updates since the version you are using. MBQI has been dealing with various issues when using quantified arrays. The array free version of this is (declare-sort C 0) (declare-const Q BArray) Side note: z3 arrays allow lambda expressions as arrays. So every lambda term can be used as an array. |
I confirmed that a more recent release returns "sat" very quickly. Here is a somewhat less reduced example with the same property that Q = (lambda ((x C)) true) satisfies it. If I move the existential quantifier to top level, it is "sat". (declare-sort C 0) (assert (check-sat) |
It is hitting some areas related to arrays and MBQI that are not well supported in the legacy core. |
;; Are there flags that could make this work better? Any other ideas?
;; z3 --version
;; Z3 version 4.11.2 - 64 bit
;; This is greatly reduced from a larger example. Array quantification
;; does not seem to work well. MBQI doesn't help.
;; My z3 returns "unknown" immediately. It does not seem
;; to be trying very hard.
;; This is frustrating, because it could literally use anything for T2
;; and Q(x) = true for all x, and it would find a model
;; If we change the consequent to (not (select Q x)), it comes back
;; "sat" immediately.
(declare-sort C 0)
(declare-const Q (Array C Bool))
(assert
(forall ( (T2 (Array C Bool)) )
(forall ((x C))
(=> (select T2 x)
(select Q x)))))
(check-sat)
The text was updated successfully, but these errors were encountered: