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 8f7df38 commit 0b5a691Copy full SHA for 0b5a691
unit/solvers/prop/bdd_expr.cpp
@@ -44,4 +44,23 @@ SCENARIO("bdd_expr", "[core][solver][prop][bdd_expr]")
44
REQUIRE(bdd.as_expr() == bdd2.as_expr());
45
}
46
47
+
48
+ GIVEN("A bdd for (a&!b)")
49
+ {
50
+ const symbol_exprt a("a", bool_typet());
51
+ const symbol_exprt b("b", bool_typet());
52
53
+ const bddt bdd = bdd_expr_converter.from_expr(and_exprt(a, not_exprt(b)));
54
55
+ WHEN("It is converted to an exprt")
56
57
+ const exprt result = bdd_expr_converter.as_expr(bdd);
58
+ THEN("It is equal to the expression (a & !b) or (!b & a)")
59
60
+ const bool correct =
61
+ result == and_exprt(a, not_exprt(b)) || result == and_exprt(not_exprt(b), a);
62
+ REQUIRE(correct);
63
+ }
64
65
66
0 commit comments