Skip to content

Commit 6406fdf

Browse files
Fix bdd.as_expr()
There was a mistake in the way complement is computed when going to the then_branch.
1 parent f9edf73 commit 6406fdf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/solvers/prop/bdd_expr.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,14 @@ exprt bdd_exprt::as_expr(const bdd_nodet &r, bool complement) const
119119
if(r.else_branch().is_complement() != complement)
120120
{
121121
return and_exprt(
122-
n_expr, as_expr(r.then_branch(), complement != r.is_complement()));
122+
n_expr,
123+
as_expr(
124+
r.then_branch(), complement != r.then_branch().is_complement()));
123125
}
124126
return or_exprt(
125127
not_exprt(n_expr),
126-
as_expr(r.then_branch(), complement != r.is_complement()));
128+
as_expr(
129+
r.then_branch(), complement != r.then_branch().is_complement()));
127130
}
128131
}
129132
else if(r.then_branch().is_constant())

0 commit comments

Comments
 (0)