diff --git a/src/muz/spacer/spacer_unsat_core_plugin.cpp b/src/muz/spacer/spacer_unsat_core_plugin.cpp index 66abb32c6..0d90d2653 100644 --- a/src/muz/spacer/spacer_unsat_core_plugin.cpp +++ b/src/muz/spacer/spacer_unsat_core_plugin.cpp @@ -330,8 +330,7 @@ void unsat_core_plugin_farkas_lemma::compute_linear_combination(const vector todo; @@ -604,21 +614,28 @@ void unsat_core_plugin_farkas_lemma::compute_linear_combination(const vector& todo2) + + void unsat_core_plugin_min_cut::advance_to_lowest_partial_cut(proof* step, ptr_vector& todo) { bool is_sink = true; ast_manager &m = m_learner.m; - ptr_vector todo; + ptr_vector todo_subproof; for (unsigned i = 0, sz = m.get_num_parents(step); i < sz; ++i) { @@ -626,16 +643,16 @@ void unsat_core_plugin_farkas_lemma::compute_linear_combination(const vectorget_arg(i))); proof* premise = m.get_parent (current, i); - todo.push_back(premise); + todo_subproof.push_back(premise); } } } @@ -680,6 +699,12 @@ void unsat_core_plugin_farkas_lemma::compute_linear_combination(const vector cut_nodes; diff --git a/src/muz/spacer/spacer_unsat_core_plugin.h b/src/muz/spacer/spacer_unsat_core_plugin.h index 388a2bd38..743d7af4a 100644 --- a/src/muz/spacer/spacer_unsat_core_plugin.h +++ b/src/muz/spacer/spacer_unsat_core_plugin.h @@ -104,7 +104,7 @@ private: ast_mark m_visited; // saves for each node i whether the subproof with root i has already been added to the min-cut-problem obj_map m_proof_to_node_minus; // maps proof-steps to the corresponding minus-nodes (the ones which are closer to source) obj_map m_proof_to_node_plus; // maps proof-steps to the corresponding plus-nodes (the ones which are closer to sink) - void advance_to_lowest_partial_cut(proof* step, ptr_vector& todo2); + void advance_to_lowest_partial_cut(proof* step, ptr_vector& todo); void add_edge(proof* i, proof* j); vector m_node_to_formula; // maps each node to the corresponding formula in the original proof diff --git a/src/test/lp.cpp b/src/test/lp.cpp index f76850e38..695a31cf4 100644 --- a/src/test/lp.cpp +++ b/src/test/lp.cpp @@ -2779,7 +2779,7 @@ If b becomes basic variable, then it is likely the old solver ends up with a row vector ev; ls.add_var_bound(a, LE, mpq(1)); ls.solve(); - bound_propagator bp(ls); + lp_bound_propagator bp(ls); ls.propagate_bounds_for_touched_rows(bp); std::cout << " bound ev from test_bound_propagation_one_small_sample1" << std::endl; for (auto & be : bp.m_ibounds) { @@ -2832,7 +2832,7 @@ void test_bound_propagation_one_row() { vector ev; ls.add_var_bound(x0, LE, mpq(1)); ls.solve(); - bound_propagator bp(ls); + lp_bound_propagator bp(ls); ls.propagate_bounds_for_touched_rows(bp); } void test_bound_propagation_one_row_with_bounded_vars() { @@ -2848,7 +2848,7 @@ void test_bound_propagation_one_row_with_bounded_vars() { ls.add_var_bound(x0, LE, mpq(3)); ls.add_var_bound(x0, LE, mpq(1)); ls.solve(); - bound_propagator bp(ls); + lp_bound_propagator bp(ls); ls.propagate_bounds_for_touched_rows(bp); } void test_bound_propagation_one_row_mixed() { @@ -2862,7 +2862,7 @@ void test_bound_propagation_one_row_mixed() { vector ev; ls.add_var_bound(x1, LE, mpq(1)); ls.solve(); - bound_propagator bp(ls); + lp_bound_propagator bp(ls); ls.propagate_bounds_for_touched_rows(bp); } @@ -2885,7 +2885,7 @@ void test_bound_propagation_two_rows() { vector ev; ls.add_var_bound(y, LE, mpq(1)); ls.solve(); - bound_propagator bp(ls); + lp_bound_propagator bp(ls); ls.propagate_bounds_for_touched_rows(bp); } @@ -2905,7 +2905,7 @@ void test_total_case_u() { vector ev; ls.add_var_bound(z, GE, zero_of_type()); ls.solve(); - bound_propagator bp(ls); + lp_bound_propagator bp(ls); ls.propagate_bounds_for_touched_rows(bp); } bool contains_j_kind(unsigned j, lconstraint_kind kind, const mpq & rs, const vector & ev) { @@ -2932,7 +2932,7 @@ void test_total_case_l(){ vector ev; ls.add_var_bound(z, LE, zero_of_type()); ls.solve(); - bound_propagator bp(ls); + lp_bound_propagator bp(ls); ls.propagate_bounds_for_touched_rows(bp); lean_assert(ev.size() == 4); lean_assert(contains_j_kind(x, GE, - one_of_type(), ev));