Skip to content

Commit

Permalink
Fix reduce_or
Browse files Browse the repository at this point in the history
  • Loading branch information
RCoeurjoly committed Jun 26, 2024
1 parent 8e3e5f5 commit 44518eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backends/functional/smtlib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ struct SmtPrintVisitor {
}

std::string reduce_or(Node, Node a, int) {
return format("(distinct %0 #b0)", np(a));
std::stringstream ss;
// We use ite to set the result to bit vector, to ensure appropriate type
ss << "(ite (= " << np(a) << " #b" << std::string(a.width(), '0') << ") #b0 #b1)";
return ss.str();
}

std::string reduce_xor(Node, Node a, int) {
Expand Down

0 comments on commit 44518eb

Please sign in to comment.