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

Non-termination(?) when specifying mod0, div0, and additional rules with quantifiers #7403

Open
Janno opened this issue Sep 26, 2024 · 0 comments

Comments

@Janno
Copy link

Janno commented Sep 26, 2024

The example below does not seem to terminate. Removing either of the three quantified assertions makes z3 terminate, though it still takes several seconds (with some variation depending on which assertion is removed).

(declare-fun b () Int)
(declare-fun a () Int)
(assert (forall ((x Int)) (! (= (mod0 x 0) 0) :pattern ((mod0 x 0)))))
(assert (forall ((x Int)) (! (= (div0 x 0) 0) :pattern ((div0 x 0)))))
 (assert (forall ((x Int) (y Int))
  (! (= (mod (mod x y) y) (mod x y)) :pattern ((mod (mod x y) y)))))
(assert (not (= (mod (+ a b) b) (mod a b))))
(check-sat)

I was assuming that these quantified assertions would be relatively harmless given that they could be rewritten eagerly without increasing the problem size. Is that not the case?

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