@@ -1451,7 +1451,7 @@ bool Counter::compute_cube(Cube& c, const int side) {
14511451 cout << endl;
14521452 const auto & tmp = decisions.top ().get_model_side (side);
14531453 FF side_count = fg->zero ();
1454- if (tmp != nullptr ) *side_count2 = * tmp;
1454+ if (tmp != nullptr ) side_count = tmp-> dup () ;
14551455 cout << COLORG " cube's SOLE count: " << *tmp << endl;
14561456 cout << COLORG " cube's RECORDED count: " << c.cnt << COLDEF << endl;
14571457#endif
@@ -1579,20 +1579,20 @@ FF Counter::check_count(const bool also_incl_curr_and_later_dec) {
15791579 if (!after_mul->is_zero ()) after_mul = fg->one ();
15801580 else after_mul = fg->zero ();
15811581 }
1582- debug_print (" correct : " << std::setprecision (10 ) << cnt);
1583- debug_print (" after_mul: : " << after_mul);
1584- debug_print (" dec_w : " << dec_w);
1582+ debug_print (" correct : " << std::setprecision (10 ) << * cnt);
1583+ debug_print (" after_mul: : " << * after_mul);
1584+ debug_print (" dec_w : " << * dec_w);
15851585 debug_print (" active : " << (decisions.top ().is_right_branch () ? " right" : " left" ));
1586- debug_print (" ds.top().left_model_count() : " << decisions.top ().left_model_count ());
1587- debug_print (" ds.top().right_model_count() : " << decisions.top ().right_model_count ());
1586+ debug_print (" ds.top().left_model_count() : " << * decisions.top ().left_model_count ());
1587+ debug_print (" ds.top().right_model_count() : " << * decisions.top ().right_model_count ());
15881588
15891589 // It can be that a subcomponent above is UNSAT, in that case, it'd be UNSAT
15901590 // and the count cannot be checked
15911591 if (solution_exist) {
15921592 if (!weighted ()) assert (*decisions.top ().total_model_count () == *cnt);
15931593 else {
15941594 bool okay = true ;
1595- FF diff = after_mul->dup ();
1595+ auto diff = after_mul->dup ();
15961596 *diff-= *cnt;
15971597 if (!diff->is_zero ()) {
15981598 auto diff_ratio = diff->dup ();
@@ -1645,7 +1645,7 @@ RetState Counter::backtrack() {
16451645 const Lit lit = top_dec_lit ();
16461646 assert (dec_level () > 0 );
16471647 CHECK_COUNT_DO (check_count (true ));
1648- SLOW_DEBUG_DO (assert (decisions.top ().right_model_count () == 0 ));
1648+ SLOW_DEBUG_DO (assert (decisions.top ().right_model_count ()-> is_zero () ));
16491649 // could be the flipped that's FALSEified so that would
16501650 // mean the watchlist is not "sane". We need to propagate the flipped var and
16511651 // then it'll be fine
0 commit comments