Skip to content

Commit cc4fae7

Browse files
author
Daniel Kroening
committed
check for side effects in quantifiers
1 parent 7de9df8 commit cc4fae7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/goto-programs/goto_clean_expr.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ bool goto_convertt::needs_cleaning(const exprt &expr)
9393
// g1 = (i == 0)
9494
// g2 = (i > 10)
9595
// forall (i : int) (g1 || g2)
96-
if(expr.id()==ID_forall || expr.id()==ID_exists)
97-
return false;
9896

9997
forall_operands(it, expr)
10098
if(needs_cleaning(*it))
@@ -409,7 +407,7 @@ void goto_convertt::clean_expr(
409407
// check if there are side-effects
410408
goto_programt tmp;
411409
clean_expr(expr.op1(), tmp, mode, true);
412-
if(tmp.instructions.empty())
410+
if(!tmp.instructions.empty())
413411
{
414412
error().source_location=expr.find_source_location();
415413
error() << "no side-effects in quantified expressions allowed"

0 commit comments

Comments
 (0)