3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-06 23:35:46 +00:00

Simplify clause_builder

This commit is contained in:
Jakob Rath 2022-10-07 15:22:49 +02:00
parent e18bc46de1
commit 8b4a36e3bd
4 changed files with 8 additions and 20 deletions

View file

@ -61,7 +61,8 @@ namespace polysat {
void clause_builder::push(signed_constraint c) {
SASSERT(c);
SASSERT(c->has_bvar());
SASSERT(!c.is_always_false()); // if this case occurs legitimately, we should skip the constraint.
if (c.is_always_false()) // filter out trivial constraints such as "4 < 2"
return;
if (c.is_always_true()) {
m_is_tautology = true;
return;
@ -73,10 +74,4 @@ namespace polysat {
#endif
m_literals.push_back(c.blit());
}
void clause_builder::push_new(signed_constraint c) {
if (c.is_always_false()) // filter out trivial constraints such as "4 < 2" (may come in from forbidden intervals)
return;
push(c);
}
}