mirror of
https://github.com/Z3Prover/z3
synced 2025-08-14 14:55:25 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
1eab774b91
commit
37a4dd68d0
8 changed files with 48 additions and 31 deletions
|
@ -259,7 +259,14 @@ namespace smt {
|
|||
template<typename Ext>
|
||||
void theory_utvpi<Ext>::init(context* ctx) {
|
||||
theory::init(ctx);
|
||||
m_zero = mk_var(ctx->mk_enode(a.mk_numeral(rational(0), true), false, false, true));
|
||||
m_zero = null_theory_var;
|
||||
}
|
||||
|
||||
template<typename Ext>
|
||||
void theory_utvpi<Ext>::init_zero() {
|
||||
if (m_zero == null_theory_var) {
|
||||
m_zero = mk_var(get_context().mk_enode(a.mk_numeral(rational(0), true), false, false, true));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -553,7 +560,7 @@ namespace smt {
|
|||
theory_var v = null_theory_var;
|
||||
context& ctx = get_context();
|
||||
if (r.is_zero()) {
|
||||
v = m_zero;
|
||||
v = get_zero(n);
|
||||
}
|
||||
else if (ctx.e_internalized(n)) {
|
||||
enode* e = ctx.get_enode(n);
|
||||
|
@ -775,6 +782,7 @@ namespace smt {
|
|||
m_factory = alloc(arith_factory, get_manager());
|
||||
m.register_factory(m_factory);
|
||||
enforce_parity();
|
||||
init_zero();
|
||||
m_graph.set_to_zero(to_var(m_zero), neg(to_var(m_zero)));
|
||||
compute_delta();
|
||||
DEBUG_CODE(model_validate(););
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue