Skip to content

Commit f63bec3

Browse files
committed
Simplify ID_and, ID_or, ID_xor via BDDs - disabled
At present, this breaks several cbmc/Quantifier* regression tests as it seemingly yields expressions of a shape not expected by that code.
1 parent 83e1395 commit f63bec3

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/util/simplify_expr_boolean.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ Author: Daniel Kroening, [email protected]
99
#include <cassert>
1010
#include <unordered_set>
1111

12+
#include <solvers/prop/bdd_expr.h>
13+
1214
#include "simplify_expr_class.h"
1315
#include "expr.h"
1416
#include "namespace.h"
17+
#include "simplify_utils.h"
1518
#include "std_expr.h"
1619

1720
/*******************************************************************\
@@ -87,6 +90,21 @@ bool simplify_exprt::simplify_boolean(exprt &expr)
8790
{
8891
if(operands.empty()) return true;
8992

93+
#if 0
94+
bdd_exprt t(ns);
95+
t.from_expr(expr);
96+
exprt tmp=t.as_expr();
97+
sort_and_join(tmp);
98+
99+
if(tmp!=expr)
100+
{
101+
expr.swap(tmp);
102+
return false;
103+
}
104+
105+
return true;
106+
#else
107+
90108
bool result=true;
91109

92110
exprt::operandst::const_iterator last;
@@ -188,6 +206,7 @@ bool simplify_exprt::simplify_boolean(exprt &expr)
188206
}
189207

190208
return result;
209+
#endif
191210
}
192211

193212
return true;

0 commit comments

Comments
 (0)