3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-10 19:27:06 +00:00

fix setup for non-linear real arithmetic per QF_UFNRA regresssions

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-12-08 09:23:57 +05:30
parent 3f19c12a12
commit a5d5dfdf86
2 changed files with 4 additions and 12 deletions

View file

@ -111,16 +111,6 @@ void static_features::flush_cache() {
m_expr2formula_depth.reset();
}
#if 0
bool static_features::is_non_linear(expr * e) const {
if (!is_arith_expr(e))
return false;
if (is_numeral(e))
return true;
if (m_autil.is_add(e))
return true; // the non
}
#endif
bool static_features::is_diff_term(expr const * e, rational & r) const {
// lhs can be 'x' or '(+ k x)'
@ -301,10 +291,12 @@ void static_features::update_core(expr * e) {
m_num_interpreted_constants++;
}
if (fid == m_afid) {
// std::cout << mk_pp(e, m_manager) << "\n";
switch (to_app(e)->get_decl_kind()) {
case OP_MUL:
if (!is_numeral(to_app(e)->get_arg(0)))
if (!is_numeral(to_app(e)->get_arg(0)) || to_app(e)->get_num_args() > 2) {
m_num_non_linear++;
}
break;
case OP_DIV:
case OP_IDIV:

View file

@ -968,7 +968,7 @@ namespace smt {
if (st.num_theories() == 2 && st.has_uf() && is_arith(st)) {
if (!st.m_has_real)
setup_QF_UFLIA(st);
else if (!st.m_has_int)
else if (!st.m_has_int && st.m_num_non_linear == 0)
setup_QF_UFLRA();
else
setup_unknown();