We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 597a5b0 commit 30dcd9aCopy full SHA for 30dcd9a
src/solvers/flattening/boolbv.cpp
@@ -631,22 +631,11 @@ bool boolbvt::boolbv_set_equality_to_true(const equal_exprt &expr)
631
632
void boolbvt::set_to(const exprt &expr, bool value)
633
{
634
- if(expr.type().id()!=ID_bool)
635
- {
636
- error() << "boolbvt::set_to got non-boolean operand: "
637
- << expr.pretty() << eom;
638
- throw 0;
639
- }
640
-
641
- if(value)
642
643
- if(expr.id()==ID_equal)
644
645
- if(!boolbv_set_equality_to_true(to_equal_expr(expr)))
646
- return;
647
648
+ PRECONDITION(expr.type().id() == ID_bool);
649
+ const auto equal_expr = expr_try_dynamic_cast<equal_exprt>(expr);
+ if(value && equal_expr && !boolbv_set_equality_to_true(*equal_expr))
+ return;
650
return SUB::set_to(expr, value);
651
}
652
0 commit comments