mirror of
https://github.com/Z3Prover/z3
synced 2026-02-14 04:41:48 +00:00
Improve comment explaining sort check fix
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
8d47a9dc61
commit
2193e04f67
1 changed files with 3 additions and 1 deletions
|
|
@ -2559,7 +2559,9 @@ namespace smt {
|
|||
ptr_buffer<expr> eqs;
|
||||
for (auto const& kv : inv) {
|
||||
expr* val = kv.m_key;
|
||||
// Only create equality if sorts match
|
||||
// When quantifiers are flattened, the instantiation set may contain
|
||||
// values from nested quantifiers with incompatible sorts. Only create
|
||||
// equality constraints when sorts match to avoid well-sortedness violations.
|
||||
if (sk->get_sort() == val->get_sort()) {
|
||||
eqs.push_back(m.mk_eq(sk, val));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue