3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-02-10 11:43:13 -08:00
parent 26eb23c05b
commit f1abc71c35
11 changed files with 71 additions and 68 deletions

View file

@ -105,7 +105,7 @@ namespace smt {
out << ")";
}
else {
out << "#" << n->get_id();
out << mk_bounded_pp(n, get_manager(), 1);
}
return out;
}

View file

@ -1369,7 +1369,7 @@ namespace smt {
template<typename Ext>
void theory_arith<Ext>::internalize_eq_eh(app * atom, bool_var v) {
expr* _lhs, *_rhs;
expr* _lhs = nullptr, *_rhs = nullptr;
if (m_params.m_arith_eager_eq_axioms && get_manager().is_eq(atom, _lhs, _rhs) && is_app(_lhs) && is_app(_rhs)) {
context & ctx = get_context();
app * lhs = to_app(_lhs);

View file

@ -1088,6 +1088,13 @@ public:
if (is_arith(n1) && is_arith(n2) && n1 != n2) {
m_arith_eq_adapter.mk_axioms(n1, n2);
}
// internalization of ite expressions produces equalities of the form
// (= x (ite c x y)) and (= y (ite c x y))
// this step ensures that a shared enode is attached
// with the ite expression.
else if (m.is_ite(lhs) || m.is_ite(rhs)) {
m_arith_eq_adapter.mk_axioms(n1, n2);
}
}
void assign_eh(bool_var v, bool is_true) {
@ -1134,6 +1141,7 @@ public:
}
void apply_sort_cnstr(enode* n, sort*) {
TRACE("arith", tout << "sort constraint: " << mk_pp(n->get_owner(), m) << "\n";);
if (!th.is_attached_to_var(n)) {
theory_var v = mk_var(n->get_owner(), false);
register_theory_var_in_lar_solver(v);