Skip to content

Commit 0696c4e

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 255f431 commit 0696c4e

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
@@ -11,8 +11,11 @@ Author: Daniel Kroening, [email protected]
1111
#include <cassert>
1212
#include <unordered_set>
1313

14+
#include <solvers/prop/bdd_expr.h>
15+
1416
#include "expr.h"
1517
#include "namespace.h"
18+
#include "simplify_utils.h"
1619
#include "std_expr.h"
1720

1821
bool simplify_exprt::simplify_boolean(exprt &expr)
@@ -79,6 +82,21 @@ bool simplify_exprt::simplify_boolean(exprt &expr)
7982
if(operands.empty())
8083
return true;
8184

85+
#if 0
86+
bdd_exprt t(ns);
87+
t.from_expr(expr);
88+
exprt tmp=t.as_expr();
89+
sort_and_join(tmp);
90+
91+
if(tmp!=expr)
92+
{
93+
expr.swap(tmp);
94+
return false;
95+
}
96+
97+
return true;
98+
#else
99+
82100
bool result=true;
83101

84102
exprt::operandst::const_iterator last;
@@ -183,6 +201,7 @@ bool simplify_exprt::simplify_boolean(exprt &expr)
183201
}
184202

185203
return result;
204+
#endif
186205
}
187206

188207
return true;

0 commit comments

Comments
 (0)