@@ -1366,9 +1366,9 @@ bool IntegerSearchHelper::BeforeTakingDecision() {
13661366 DCHECK (sat_solver_->PropagationIsDone ());
13671367
13681368 // If we pushed root level deductions, we go back to level zero and call
1369- // Propagate() to incorporate them. Note that the propagation is not strcily
1369+ // Propagate() to incorporate them. Note that the propagation is not strictly
13701370 // needed, but it is nicer to be at fixed point when we call the level zero
1371- // callabacks .
1371+ // callbacks .
13721372 if (integer_trail_->HasPendingRootLevelDeduction ()) {
13731373 sat_solver_->Backtrack (0 );
13741374 if (!sat_solver_->Propagate ()) {
@@ -1843,7 +1843,8 @@ SatSolver::Status ContinuousProber::Probe() {
18431843 tmp_dnf_.push_back ({literal});
18441844 }
18451845 ++num_at_least_one_probed_;
1846- if (!prober_->ProbeDnf (" at_least_one" , tmp_dnf_)) {
1846+ if (!prober_->ProbeDnf (" at_least_one" , tmp_dnf_,
1847+ Prober::DnfType::kAtLeastOne , clause)) {
18471848 return SatSolver::INFEASIBLE;
18481849 }
18491850
@@ -1866,7 +1867,8 @@ SatSolver::Status ContinuousProber::Probe() {
18661867 }
18671868 tmp_dnf_.push_back (tmp_literals_);
18681869 ++num_at_most_one_probed_;
1869- if (!prober_->ProbeDnf (" at_most_one" , tmp_dnf_)) {
1870+ if (!prober_->ProbeDnf (" at_most_one" , tmp_dnf_,
1871+ Prober::DnfType::kAtLeastOneOrZero )) {
18701872 return SatSolver::INFEASIBLE;
18711873 }
18721874
@@ -1887,12 +1889,12 @@ SatSolver::Status ContinuousProber::Probe() {
18871889 for (; current_bv2_ < bool_vars_.size (); ++current_bv2_) {
18881890 const BooleanVariable& bv2 = bool_vars_[current_bv2_];
18891891 if (assignment.VariableIsAssigned (bv2)) continue ;
1890- if (!prober_->ProbeDnf (
1891- " pair_of_bool_vars " ,
1892- {{ Literal (bv1, true ), Literal (bv2, true )},
1893- {Literal (bv1, true ), Literal (bv2, false )},
1894- {Literal (bv1, false ), Literal (bv2, true )},
1895- { Literal (bv1, false ), Literal (bv2, false )}} )) {
1892+ if (!prober_->ProbeDnf (" pair_of_bool_vars " ,
1893+ {{ Literal (bv1, false ), Literal (bv2, false )} ,
1894+ { Literal (bv1, false ), Literal (bv2, true )},
1895+ {Literal (bv1, true ), Literal (bv2, false )},
1896+ {Literal (bv1, true ), Literal (bv2, true )} },
1897+ Prober::DnfType:: kAtLeastOneCombination )) {
18961898 return SatSolver::INFEASIBLE;
18971899 }
18981900 RETURN_IF_NOT_FEASIBLE (PeriodicSyncAndCheck ());
@@ -1910,12 +1912,12 @@ SatSolver::Status ContinuousProber::Probe() {
19101912 if (assignment.VariableIsAssigned (bv2) || bv1 == bv2) {
19111913 continue ;
19121914 }
1913- if (!prober_->ProbeDnf (
1914- " rnd_pair_of_bool_vars " ,
1915- {{ Literal (bv1, true ), Literal (bv2, true )},
1916- {Literal (bv1, true ), Literal (bv2, false )},
1917- {Literal (bv1, false ), Literal (bv2, true )},
1918- { Literal (bv1, false ), Literal (bv2, false )}} )) {
1915+ if (!prober_->ProbeDnf (" rnd_pair_of_bool_vars " ,
1916+ {{ Literal (bv1, false ), Literal (bv2, false )} ,
1917+ { Literal (bv1, false ), Literal (bv2, true )},
1918+ {Literal (bv1, true ), Literal (bv2, false )},
1919+ {Literal (bv1, true ), Literal (bv2, true )} },
1920+ Prober::DnfType:: kAtLeastOneCombination )) {
19191921 return SatSolver::INFEASIBLE;
19201922 }
19211923
@@ -1948,12 +1950,13 @@ SatSolver::Status ContinuousProber::Probe() {
19481950 }
19491951 tmp_dnf_.clear ();
19501952 for (int i = 0 ; i < 8 ; ++i) {
1951- tmp_dnf_.push_back ({Literal (bv1, (i & 1 ) > 0 ),
1953+ tmp_dnf_.push_back ({Literal (bv1, (i & 4 ) > 0 ),
19521954 Literal (bv2, (i & 2 ) > 0 ),
1953- Literal (bv3, (i & 4 ) > 0 )});
1955+ Literal (bv3, (i & 1 ) > 0 )});
19541956 }
19551957
1956- if (!prober_->ProbeDnf (" rnd_triplet_of_bool_vars" , tmp_dnf_)) {
1958+ if (!prober_->ProbeDnf (" rnd_triplet_of_bool_vars" , tmp_dnf_,
1959+ Prober::DnfType::kAtLeastOneCombination )) {
19571960 return SatSolver::INFEASIBLE;
19581961 }
19591962
0 commit comments