@@ -518,12 +518,12 @@ namespace sat {
518518 }
519519
520520 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 ) {
522522 m_stats.m_bin_propagate ++;
523523 assign (l1, justification (lvl (l2), l2));
524524 return true ;
525525 }
526- if (value (l1) == l_false) {
526+ if (value (l1) == l_false && value (l2) != l_true ) {
527527 m_stats.m_bin_propagate ++;
528528 assign (l2, justification (lvl (l1), l1));
529529 return true ;
@@ -4579,7 +4579,6 @@ namespace sat {
45794579 void solver::extract_fixed_consequences (literal_set const & unfixed_lits, literal_set const & assumptions, bool_var_set& unfixed_vars, vector<literal_vector>& conseq) {
45804580 for (literal lit: unfixed_lits) {
45814581 TRACE (" sat" , tout << " extract: " << lit << " " << value (lit) << " " << lvl (lit) << " \n " ;);
4582-
45834582 if (lvl (lit) <= 1 && value (lit) == l_true) {
45844583 extract_fixed_consequences (lit, assumptions, unfixed_vars, conseq);
45854584 }
@@ -4606,7 +4605,8 @@ namespace sat {
46064605 case justification::NONE:
46074606 break ;
46084607 case justification::BINARY:
4609- if (!check_domain (lit, ~js.get_literal ())) return false ;
4608+ if (!check_domain (lit, ~js.get_literal ()))
4609+ return false ;
46104610 s |= m_antecedents.find (js.get_literal ().var ());
46114611 break ;
46124612 case justification::CLAUSE: {
@@ -4680,9 +4680,9 @@ namespace sat {
46804680 SASSERT (m_todo_antecedents.empty ());
46814681 m_todo_antecedents.push_back (lit);
46824682 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))
46844685 m_todo_antecedents.pop_back ();
4685- }
46864686 }
46874687 }
46884688
0 commit comments