mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 09:35:32 +00:00
deal with subtraction that manages to sneak in. Issue #996
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
aceee3fac8
commit
d14f2af5ae
8 changed files with 84 additions and 47 deletions
|
@ -137,8 +137,10 @@ public:
|
|||
SASSERT(num.is_unsigned());
|
||||
expr_ref head(m);
|
||||
ptr_vector<func_decl> const& enums = *dt.get_datatype_constructors(f->get_range());
|
||||
head = m.mk_eq(m.mk_const(f), m.mk_const(enums[num.get_unsigned()]));
|
||||
consequences[i] = m.mk_implies(a, head);
|
||||
if (enums.size() > num.get_unsigned()) {
|
||||
head = m.mk_eq(m.mk_const(f), m.mk_const(enums[num.get_unsigned()]));
|
||||
consequences[i] = m.mk_implies(a, head);
|
||||
}
|
||||
}
|
||||
}
|
||||
return r;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue