3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-19 23:14: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:
Nikolaj Bjorner 2025-11-26 15:35:19 -08:00
parent 7b9eb2a92f
commit e4697fe18e
59 changed files with 94 additions and 843 deletions

View file

@ -1282,7 +1282,7 @@ void core::add_bounds() {
}
}
lbool core::check() {
lbool core::check(unsigned level) {
lp_settings().stats().m_nla_calls++;
TRACE(nla_solver, tout << "calls = " << lp_settings().stats().m_nla_calls << "\n";);
lra.get_rid_of_inf_eps();
@ -1363,7 +1363,7 @@ lbool core::check() {
ret = bounded_nlsat();
}
if (no_effect() && params().arith_nl_nra()) {
if (no_effect() && params().arith_nl_nra() && level >= 2) {
scoped_limits sl(m_reslim);
sl.push_child(&m_nra_lim);
params_ref p;
@ -1432,7 +1432,7 @@ bool core::no_lemmas_hold() const {
lbool core::test_check() {
lra.set_status(lp::lp_status::OPTIMAL);
return check();
return check(2);
}
std::unordered_set<lpvar> core::get_vars_of_expr_with_opening_terms(const nex *e ) {

View file

@ -394,7 +394,7 @@ public:
bool conflict_found() const;
lbool check();
lbool check(unsigned level);
lbool check_power(lpvar r, lpvar x, lpvar y);
void check_bounded_divisions();

View file

@ -46,8 +46,8 @@ namespace nla {
bool solver::need_check() { return m_core->has_relevant_monomial(); }
lbool solver::check() {
return m_core->check();
lbool solver::check(unsigned level) {
return m_core->check(level);
}
void solver::propagate() {

View file

@ -37,7 +37,7 @@ namespace nla {
void push();
void pop(unsigned scopes);
bool need_check();
lbool check();
lbool check(unsigned level);
void propagate();
void simplify() { m_core->simplify(); }
lbool check_power(lpvar r, lpvar x, lpvar y);