mirror of
https://github.com/Z3Prover/z3
synced 2026-02-20 07:24:40 +00:00
remove set cardinality operators from array theory. Make final-check use priority levels
Issue #7502 shows that running nlsat eagerly during final check can block quantifier instantiation. To give space for quantifier instances we introduce two levels for final check such that nlsat is only applied in the second and final level.
This commit is contained in:
parent
7b9eb2a92f
commit
e4697fe18e
59 changed files with 94 additions and 843 deletions
|
|
@ -1000,6 +1000,7 @@ namespace arith {
|
|||
}
|
||||
|
||||
sat::check_result solver::check() {
|
||||
unsigned level = 2;
|
||||
force_push();
|
||||
m_model_is_initialized = false;
|
||||
IF_VERBOSE(12, verbose_stream() << "final-check " << lp().get_status() << "\n");
|
||||
|
|
@ -1042,7 +1043,7 @@ namespace arith {
|
|||
if (!check_delayed_eqs())
|
||||
return sat::check_result::CR_CONTINUE;
|
||||
|
||||
switch (check_nla()) {
|
||||
switch (check_nla(level)) {
|
||||
case l_true:
|
||||
m_use_nra_model = true;
|
||||
break;
|
||||
|
|
@ -1498,7 +1499,7 @@ namespace arith {
|
|||
}
|
||||
|
||||
|
||||
lbool solver::check_nla() {
|
||||
lbool solver::check_nla(unsigned level) {
|
||||
if (!m.inc()) {
|
||||
TRACE(arith, tout << "canceled\n";);
|
||||
return l_undef;
|
||||
|
|
@ -1509,7 +1510,7 @@ namespace arith {
|
|||
if (!m_nla->need_check())
|
||||
return l_true;
|
||||
|
||||
lbool r = m_nla->check();
|
||||
lbool r = m_nla->check(level);
|
||||
switch (r) {
|
||||
case l_false:
|
||||
add_lemmas();
|
||||
|
|
|
|||
|
|
@ -407,7 +407,7 @@ namespace arith {
|
|||
lbool make_feasible();
|
||||
bool check_delayed_eqs();
|
||||
lbool check_lia();
|
||||
lbool check_nla();
|
||||
lbool check_nla(unsigned level);
|
||||
bool check_bv_terms();
|
||||
bool check_bv_term(app* n);
|
||||
void add_lemmas();
|
||||
|
|
|
|||
|
|
@ -137,10 +137,6 @@ namespace array {
|
|||
add_equiv(eq, sub);
|
||||
break;
|
||||
}
|
||||
case OP_SET_HAS_SIZE:
|
||||
case OP_SET_CARD:
|
||||
ctx.unhandled_function(n->get_decl());
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
|
|
@ -184,10 +180,6 @@ namespace array {
|
|||
break;
|
||||
case OP_SET_SUBSET:
|
||||
break;
|
||||
case OP_SET_HAS_SIZE:
|
||||
case OP_SET_CARD:
|
||||
ctx.unhandled_function(n->get_decl());
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -644,6 +644,8 @@ namespace euf {
|
|||
return m_egraph.find(m.mk_false());
|
||||
}
|
||||
|
||||
// NB. revisit this for interleaving qsolver with theory solvers based on priorities of
|
||||
// activities such as calling nlsat as a final check.
|
||||
sat::check_result solver::check() {
|
||||
++m_stats.m_final_checks;
|
||||
TRACE(euf, s().display(tout););
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue