mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 20:05:51 +00:00
delay internalize (#4714)
* adding array solver Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * use default in model construction Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * debug delay internalization Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * bv Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * arrays Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * get rid of implied values and bounds Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * redo egraph * remove out Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * remove files Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
25724401cf
commit
367e5fdd52
60 changed files with 1343 additions and 924 deletions
|
@ -116,23 +116,43 @@ namespace euf {
|
|||
pop_core(n);
|
||||
}
|
||||
|
||||
sat::status th_euf_solver::mk_status() {
|
||||
return sat::status::th(m_is_redundant, get_id());
|
||||
}
|
||||
|
||||
bool th_euf_solver::add_unit(sat::literal lit) {
|
||||
return !is_true(lit) && (ctx.s().add_clause(1, &lit, sat::status::th(m_is_redundant, get_id())), true);
|
||||
bool was_true = is_true(lit);
|
||||
ctx.s().add_clause(1, &lit, mk_status());
|
||||
return !was_true;
|
||||
}
|
||||
|
||||
bool th_euf_solver::add_clause(sat::literal a, sat::literal b) {
|
||||
bool was_true = is_true(a, b);
|
||||
sat::literal lits[2] = { a, b };
|
||||
return !is_true(a, b) && (ctx.s().add_clause(2, lits, sat::status::th(m_is_redundant, get_id())), true);
|
||||
ctx.s().add_clause(2, lits, mk_status());
|
||||
return !was_true;
|
||||
}
|
||||
|
||||
bool th_euf_solver::add_clause(sat::literal a, sat::literal b, sat::literal c) {
|
||||
bool was_true = is_true(a, b, c);
|
||||
sat::literal lits[3] = { a, b, c };
|
||||
return !is_true(a, b, c) && (ctx.s().add_clause(3, lits, sat::status::th(m_is_redundant, get_id())), true);
|
||||
ctx.s().add_clause(3, lits, mk_status());
|
||||
return !was_true;
|
||||
}
|
||||
|
||||
bool th_euf_solver::add_clause(sat::literal a, sat::literal b, sat::literal c, sat::literal d) {
|
||||
bool was_true = is_true(a, b, c, d);
|
||||
sat::literal lits[4] = { a, b, c, d };
|
||||
return !is_true(a, b, c, d) && (ctx.s().add_clause(4, lits, sat::status::th(m_is_redundant, get_id())), true);
|
||||
ctx.s().add_clause(4, lits, mk_status());
|
||||
return !was_true;
|
||||
}
|
||||
|
||||
bool th_euf_solver::add_clause(sat::literal_vector const& lits) {
|
||||
bool was_true = false;
|
||||
for (auto lit : lits)
|
||||
was_true |= is_true(lit);
|
||||
s().add_clause(lits.size(), lits.c_ptr(), mk_status());
|
||||
return !was_true;
|
||||
}
|
||||
|
||||
bool th_euf_solver::is_true(sat::literal lit) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue