Skip to content

Commit

Permalink
fix corner case of ARITH_EQ_TERM in detecting is_mixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-irfan committed Nov 30, 2023
1 parent 71888bf commit 7fa9e25
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mcsat/preprocessor.c
Expand Up @@ -511,10 +511,10 @@ term_t preprocessor_apply(preprocessor_t* pre, term_t t, ivector_t* out, bool is

term_t eq_solve_var = NULL_TERM;
if (is_assertion && is_equality && !is_boolean) {
bool is_mixed =
term_type(pre->terms, desc->arg[0]) != term_type(pre->terms, desc->arg[1]);
// don't rewrite if equality is between mixed terms, e.g. between int and real terms
if (!is_mixed && current == t) {
bool is_lhs_rhs_mixed = desc->arity > 1 &&
term_type_kind(pre->terms, desc->arg[0]) != term_type_kind(pre->terms, desc->arg[1]);
// don't rewrite if equality is between mixed terms, e.g. between int and real terms
if (!is_lhs_rhs_mixed && current == t) {
eq_solve_var = preprocessor_get_eq_solved_var(pre, t);
if (eq_solve_var == NULL_TERM) {
term_t lhs = desc->arg[0];
Expand Down

0 comments on commit 7fa9e25

Please sign in to comment.