mirror of
https://github.com/Z3Prover/z3
synced 2025-06-16 19:06:17 +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:
parent
3f19c12a12
commit
a5d5dfdf86
2 changed files with 4 additions and 12 deletions
|
@ -111,16 +111,6 @@ void static_features::flush_cache() {
|
||||||
m_expr2formula_depth.reset();
|
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 {
|
bool static_features::is_diff_term(expr const * e, rational & r) const {
|
||||||
// lhs can be 'x' or '(+ k x)'
|
// lhs can be 'x' or '(+ k x)'
|
||||||
|
@ -301,10 +291,12 @@ void static_features::update_core(expr * e) {
|
||||||
m_num_interpreted_constants++;
|
m_num_interpreted_constants++;
|
||||||
}
|
}
|
||||||
if (fid == m_afid) {
|
if (fid == m_afid) {
|
||||||
|
// std::cout << mk_pp(e, m_manager) << "\n";
|
||||||
switch (to_app(e)->get_decl_kind()) {
|
switch (to_app(e)->get_decl_kind()) {
|
||||||
case OP_MUL:
|
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++;
|
m_num_non_linear++;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case OP_DIV:
|
case OP_DIV:
|
||||||
case OP_IDIV:
|
case OP_IDIV:
|
||||||
|
|
|
@ -968,7 +968,7 @@ namespace smt {
|
||||||
if (st.num_theories() == 2 && st.has_uf() && is_arith(st)) {
|
if (st.num_theories() == 2 && st.has_uf() && is_arith(st)) {
|
||||||
if (!st.m_has_real)
|
if (!st.m_has_real)
|
||||||
setup_QF_UFLIA(st);
|
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();
|
setup_QF_UFLRA();
|
||||||
else
|
else
|
||||||
setup_unknown();
|
setup_unknown();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue