mirror of
https://github.com/Z3Prover/z3
synced 2026-07-24 16:02:33 +00:00
Model extraction bug
This commit is contained in:
parent
325cff40da
commit
96241a5025
1 changed files with 8 additions and 1 deletions
|
|
@ -6339,7 +6339,14 @@ namespace seq {
|
||||||
for (auto const& mem : node.str_mems()) {
|
for (auto const& mem : node.str_mems()) {
|
||||||
if (!mem.is_primitive())
|
if (!mem.is_primitive())
|
||||||
continue;
|
continue;
|
||||||
if (mem.m_str->first() != var)
|
// Compare by expression, not snode pointer: the sgraph may hold
|
||||||
|
// several distinct snode objects for the same hash-consed
|
||||||
|
// expression (seq_model passes a snode re-created from the
|
||||||
|
// substitution tree). A pointer mismatch would silently drop the
|
||||||
|
// variable's view/plain components here, and product_witness's
|
||||||
|
// empty-tuple fast path would then fabricate an unconstrained
|
||||||
|
// filler word resulting in an invalid model.
|
||||||
|
if (mem.m_str->first()->get_expr() != var->get_expr())
|
||||||
continue;
|
continue;
|
||||||
switch (mem.m_kind) {
|
switch (mem.m_kind) {
|
||||||
case mem_kind::plain:
|
case mem_kind::plain:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue