Skip to content

Commit d4b5f48

Browse files
authored
Merge pull request #7017 from tautschnig/cleanup/l_set_to
propt::l_set_to: avoid duplicate work
2 parents 1cb7776 + bc1e56c commit d4b5f48

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/solvers/prop/prop.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ Author: Daniel Kroening, [email protected]
1111
/// asserts a==b in the propositional formula
1212
void propt::set_equal(literalt a, literalt b)
1313
{
14+
if(b.is_constant())
15+
{
16+
if(b.is_true())
17+
lcnf({a});
18+
else
19+
lcnf({!a});
20+
21+
return;
22+
}
23+
1424
lcnf(a, !b);
1525
lcnf(!a, b);
1626
}

0 commit comments

Comments
 (0)