Skip to content

Commit 093fbe5

Browse files
committed
replace iso646 operators
1 parent 86627d7 commit 093fbe5

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/solvers/flattening/boolbv_quantifier.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ exprt get_quantifier_var_min(
5353
const exprt &var_expr,
5454
const exprt &quantifier_expr)
5555
{
56-
assert(quantifier_expr.id()==ID_or
57-
or quantifier_expr.id()==ID_and);
56+
assert(quantifier_expr.id()==ID_or ||
57+
quantifier_expr.id()==ID_and);
5858
exprt res;
5959
res.make_false();
6060
if(quantifier_expr.id()==ID_or)
@@ -109,8 +109,8 @@ exprt get_quantifier_var_max(
109109
const exprt &var_expr,
110110
const exprt &quantifier_expr)
111111
{
112-
assert(quantifier_expr.id()==ID_or
113-
or quantifier_expr.id()==ID_and);
112+
assert(quantifier_expr.id()==ID_or ||
113+
quantifier_expr.id()==ID_and);
114114
exprt res;
115115
res.make_false();
116116
if(quantifier_expr.id()==ID_or)
@@ -178,12 +178,14 @@ Function: instantiate_quantifier
178178
bool instantiate_quantifier(exprt &expr,
179179
const namespacet &ns)
180180
{
181-
if(not(expr.id()==ID_forall or expr.id()==ID_exists))
181+
if(not(expr.id()==ID_forall || expr.id()==ID_exists))
182182
return true;
183+
183184
assert(expr.operands().size()==2);
184185
assert(expr.op0().id()==ID_symbol);
185186

186187
exprt var_expr=expr.op0();
188+
187189
/**
188190
* We need to rewrite the forall/exists quantifier into
189191
* an OR/AND expr.
@@ -192,8 +194,8 @@ bool instantiate_quantifier(exprt &expr,
192194
exprt tmp(re.op1());
193195
re.swap(tmp);
194196
re=simplify_expr(re, ns);
195-
if(re.is_true()
196-
or re.is_false())
197+
198+
if(re.is_true() || re.is_false())
197199
{
198200
expr=re;
199201
return true;
@@ -252,7 +254,7 @@ Function: boolbvt::convert_quantifier
252254
literalt boolbvt::convert_quantifier(const exprt &src)
253255
{
254256
exprt expr(src);
255-
if(not instantiate_quantifier(expr, ns))
257+
if(!instantiate_quantifier(expr, ns))
256258
return SUB::convert_rest(src);
257259

258260
quantifiert quantifier;

0 commit comments

Comments
 (0)