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

ASSERTION VIOLATION with z3 version 4.13.3.0 #7478

Open
etiennejf opened this issue Dec 13, 2024 · 0 comments
Open

ASSERTION VIOLATION with z3 version 4.13.3.0 #7478

etiennejf opened this issue Dec 13, 2024 · 0 comments
Assignees

Comments

@etiennejf
Copy link

etiennejf commented Dec 13, 2024

An assertion violation is randomly obtained when invoking z3 on the following example:

(set-option :print-success true)
(set-logic ALL)
(set-option :produce-models true)
(set-option :produce-proofs true)
(set-option :smt.pull-nested-quantifiers true)
(set-option :smt.mbqi true)
(define-sort Nat () Int)
(define-fun @isNat ((@x Nat)) Bool (<= 0 @x))
(declare-const x Nat)
(declare-const y Nat)
(declare-const z Nat)
(define-fun Nat.mod ((@x Nat)(@y Nat)) Nat (ite (= 0 @y) @x (mod @x @y)))
(assert (not (=> (@isNat x) (=> (@isNat y) (=> (@isNat z) (= (Nat.mod x y) (Nat.mod (+ x (* y z)) y)))))))
(check-sat)

The violation obtained is the following:

ASSERTION VIOLATION
File: /builddir/build/BUILD/z3-z3-4.13.3/src/nlsat/nlsat_solver.cpp
Line: 2770
Failed to verify: m_cache.mk_unique(p) == p

4.13.3.0
Please file an issue with this message and more detail about how you encountered it at https://github.com/Z3Prover/z3/issues/new

Note that this violation is not always obtained systematically on a specific run. Indeed, sometimes a run may return the expected unsat result.

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

3 participants