@@ -518,12 +518,12 @@ namespace sat {
518
518
}
519
519
520
520
bool solver::propagate_bin_clause (literal l1, literal l2) {
521
- if (value (l2) == l_false) {
521
+ if (value (l2) == l_false && value (l1) != l_true ) {
522
522
m_stats.m_bin_propagate ++;
523
523
assign (l1, justification (lvl (l2), l2));
524
524
return true ;
525
525
}
526
- if (value (l1) == l_false) {
526
+ if (value (l1) == l_false && value (l2) != l_true ) {
527
527
m_stats.m_bin_propagate ++;
528
528
assign (l2, justification (lvl (l1), l1));
529
529
return true ;
@@ -4579,7 +4579,6 @@ namespace sat {
4579
4579
void solver::extract_fixed_consequences (literal_set const & unfixed_lits, literal_set const & assumptions, bool_var_set& unfixed_vars, vector<literal_vector>& conseq) {
4580
4580
for (literal lit: unfixed_lits) {
4581
4581
TRACE (" sat" , tout << " extract: " << lit << " " << value (lit) << " " << lvl (lit) << " \n " ;);
4582
-
4583
4582
if (lvl (lit) <= 1 && value (lit) == l_true) {
4584
4583
extract_fixed_consequences (lit, assumptions, unfixed_vars, conseq);
4585
4584
}
@@ -4606,7 +4605,8 @@ namespace sat {
4606
4605
case justification::NONE:
4607
4606
break ;
4608
4607
case justification::BINARY:
4609
- if (!check_domain (lit, ~js.get_literal ())) return false ;
4608
+ if (!check_domain (lit, ~js.get_literal ()))
4609
+ return false ;
4610
4610
s |= m_antecedents.find (js.get_literal ().var ());
4611
4611
break ;
4612
4612
case justification::CLAUSE: {
@@ -4680,9 +4680,9 @@ namespace sat {
4680
4680
SASSERT (m_todo_antecedents.empty ());
4681
4681
m_todo_antecedents.push_back (lit);
4682
4682
while (!m_todo_antecedents.empty ()) {
4683
- if (extract_fixed_consequences1 (m_todo_antecedents.back (), assumptions, unfixed, conseq)) {
4683
+ auto lit = m_todo_antecedents.back ();
4684
+ if (extract_fixed_consequences1 (lit, assumptions, unfixed, conseq))
4684
4685
m_todo_antecedents.pop_back ();
4685
- }
4686
4686
}
4687
4687
}
4688
4688
0 commit comments