3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-25 20:46:01 +00:00
This commit is contained in:
Nikolaj Bjorner 2020-12-02 12:24:35 -08:00
parent 9156e355d8
commit 12198d13ac
10 changed files with 42 additions and 28 deletions

View file

@ -436,6 +436,7 @@ namespace arith {
if (_has_var)
return v;
theory_var w = mk_evar(n);
internalize_term(n);
svector<lpvar> vars;
for (unsigned i = 0; i < p; ++i)
vars.push_back(register_theory_var_in_lar_solver(w));

View file

@ -360,11 +360,12 @@ namespace bv {
case bv_justification::kind_t::eq2bit:
++s_count;
// std::cout << "eq2bit " << s_count << "\n";
#if 1
#if 0
if (s_count == 1899) {
std::cout << "eq2bit " << mk_bounded_pp(var2expr(c.m_v1), m) << " == " << mk_bounded_pp(var2expr(c.m_v2), m) << "\n";
std::cout << mk_bounded_pp(literal2expr(~c.m_antecedent), m, 2) << "\n";
std::cout << mk_bounded_pp(literal2expr(c.m_consequent), m, 2) << "\n";
std::cout << mk_bounded_pp(literal2expr(~c.m_antecedent), m, 4) << "\n";
std::cout << mk_bounded_pp(literal2expr(c.m_consequent), m, 4) << "\n";
std::cout << literal2expr(c.m_consequent) << "\n";
#if 0
solver_ref slv = mk_smt2_solver(m, ctx.s().params());
slv->assert_expr(eq);
@ -779,8 +780,6 @@ namespace bv {
}
sat::justification solver::mk_eq2bit_justification(theory_var v1, theory_var v2, sat::literal c, sat::literal a) {
if (v1 == 3202 && v2 == 3404) std::cout << a << " -> " << c << "\n";
SASSERT(!(v1 == 3202 && v2 == 3404 && c.var() == 8691));
void* mem = get_region().allocate(bv_justification::get_obj_size());
sat::constraint_base::initialize(mem, this);
auto* constraint = new (sat::constraint_base::ptr2mem(mem)) bv_justification(v1, v2, c, a);

View file

@ -76,7 +76,8 @@ namespace euf {
if (!use_drat())
return;
literal_vector lits;
for (literal lit : r) lits.push_back(~lit);
for (literal lit : r)
lits.push_back(~lit);
if (l != sat::null_literal)
lits.push_back(l);
get_drat().add(lits, sat::status::th(true, get_id()));

View file

@ -692,6 +692,13 @@ namespace euf {
finish_reinit();
for (auto* e : m_solvers)
e->pop_reinit();
#if 0
for (enode* n : m_egraph.nodes()) {
if (n->bool_var() != sat::null_bool_var && s().is_free(n->bool_var()))
std::cout << "has free " << n->bool_var() << "\n";
}
#endif
}
bool solver::validate() {