Skip to content

Commit

Permalink
fix: multiplication of power-products can be either bitvector or real
Browse files Browse the repository at this point in the history
  • Loading branch information
Dejan Jovanovic committed Jan 4, 2021
1 parent 0f2b8b3 commit 37860ea
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/expr/term_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,10 @@ bool term_manager::is_array_type(term_ref t) const {
return d_tm->is_array_type(t);
}

bool term_manager::is_bitvector_type(term_ref t) const {
return d_tm->is_bitvector_type(t);
}

bool term_manager::is_integer_type(term_ref t) const {
return d_tm->is_integer_type(t);
}
Expand Down
3 changes: 3 additions & 0 deletions src/expr/term_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,9 @@ class term_manager {
/** Check if t is an array type */
bool is_array_type(term_ref t) const;

/** Check if t is a bitvector type */
bool is_bitvector_type(term_ref t) const;

/** Check if t is an integer type */
bool is_integer_type(term_ref t) const;

Expand Down
6 changes: 5 additions & 1 deletion src/smt/yices2/yices2_internal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,11 @@ class to_term_visitor {
pow_children.push_back(d_conversion_cache.get_term_cache(p_t));
}
}
result = d_tm.mk_term(expr::TERM_BV_MUL, pow_children);
if (yices_term_is_bitvector(yices_term)) {
result = d_tm.mk_term(expr::TERM_BV_MUL, pow_children);
} else {
result = d_tm.mk_term(expr::TERM_MUL, pow_children);
}
break;
}
default:
Expand Down

0 comments on commit 37860ea

Please sign in to comment.