Skip to content

Commit 8bbe752

Browse files
remove dead code
Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent 7e4a1f2 commit 8bbe752

File tree

1 file changed

+0
-87
lines changed

1 file changed

+0
-87
lines changed

src/math/lp/int_solver.cpp

-87
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,6 @@ namespace lp {
176176
if (r == lia_move::conflict) {
177177
m_dio.explain(*this->m_ex);
178178
return lia_move::conflict;
179-
} else if (r == lia_move::branch) {
180-
return lia_move::branch;
181179
}
182180
return r;
183181
}
@@ -214,90 +212,6 @@ namespace lp {
214212
m_hnf_cut_period = settings().hnf_cut_period();
215213
return r;
216214
}
217-
218-
// Tighten bounds
219-
// expose at level of lar_solver so it can be invoked by theory_lra after back-jumping
220-
// consider multi-round bound tightnening as well and deal with divergence issues.
221-
222-
unsigned m_bounds_refine_depth = 0;
223-
224-
lia_move tighten_bounds() {
225-
226-
if (m_bounds_refine_depth > 10)
227-
return lia_move::undef;
228-
229-
struct bound_consumer {
230-
imp& i;
231-
bound_consumer(imp& i) : i(i) {}
232-
lar_solver& lp() { return i.lra; }
233-
bool bound_is_interesting(unsigned vi, lp::lconstraint_kind kind, const rational& bval) const { return true; }
234-
bool add_eq(lpvar u, lpvar v, lp::explanation const& e, bool is_fixed) { return false; }
235-
};
236-
bound_consumer bc(*this);
237-
std_vector<implied_bound> ibounds;
238-
lp_bound_propagator<bound_consumer> bp(bc, ibounds);
239-
240-
auto set_conflict = [&](u_dependency * d1, u_dependency * d2) {
241-
++settings().stats().m_bounds_tightening_conflicts;
242-
for (auto e : lra.flatten(d1))
243-
m_ex->push_back(e);
244-
for (auto e : lra.flatten(d2))
245-
m_ex->push_back(e);
246-
};
247-
248-
bool bounds_refined = false;
249-
auto refine_bound = [&](implied_bound const& ib) {
250-
unsigned j = ib.m_j;
251-
rational bound = ib.m_bound;
252-
if (ib.m_is_lower_bound) {
253-
if (lra.column_is_int(j))
254-
bound = ceil(bound);
255-
if (lra.column_has_lower_bound(j) && lra.column_lower_bound(j) >= bound)
256-
return l_undef;
257-
auto d = ib.explain_implied();
258-
if (lra.column_has_upper_bound(j) && lra.column_upper_bound(j) < bound) {
259-
set_conflict(d, lra.get_column_upper_bound_witness(j));
260-
return l_false;
261-
}
262-
lra.update_column_type_and_bound(j, ib.m_strict ? lconstraint_kind::GT : lconstraint_kind::GE, bound, d);
263-
}
264-
else {
265-
if (lra.column_is_int(j))
266-
bound = floor(bound);
267-
if (lra.column_has_upper_bound(j) && lra.column_upper_bound(j) <= bound)
268-
return l_undef;
269-
auto d = ib.explain_implied();
270-
if (lra.column_has_lower_bound(j) && lra.column_lower_bound(j) > bound) {
271-
set_conflict(d, lra.get_column_lower_bound_witness(j));
272-
return l_false;
273-
}
274-
lra.update_column_type_and_bound(j, ib.m_strict ? lconstraint_kind::LT : lconstraint_kind::LE, bound, d);
275-
}
276-
++settings().stats().m_bounds_tightenings;
277-
bounds_refined = true;
278-
return l_true;
279-
};
280-
281-
for (unsigned row_index = 0; row_index < lra.row_count(); ++row_index) {
282-
bp.init();
283-
bound_analyzer_on_row<row_strip<mpq>, lp_bound_propagator<bound_consumer>>::analyze_row(
284-
lra.A_r().m_rows[row_index],
285-
zero_of_type<numeric_pair<mpq>>(),
286-
bp);
287-
288-
for (auto const& ib : ibounds)
289-
if (l_false == refine_bound(ib))
290-
return lia_move::conflict;
291-
}
292-
293-
if (bounds_refined) {
294-
lra.trail().push(value_trail(m_bounds_refine_depth));
295-
++m_bounds_refine_depth;
296-
}
297-
298-
return bounds_refined ? lia_move::continue_with_check : lia_move::undef;
299-
}
300-
301215

302216
lia_move check(lp::explanation * e) {
303217
SASSERT(lra.ax_is_correct());
@@ -324,7 +238,6 @@ namespace lp {
324238
if (r == lia_move::undef) r = patch_basic_columns();
325239
if (r == lia_move::undef && should_find_cube()) r = int_cube(lia)();
326240
if (r == lia_move::undef) lra.move_non_basic_columns_to_bounds();
327-
// if (r == lia_move::undef) r = tighten_bounds();
328241
if (r == lia_move::undef && should_hnf_cut()) r = hnf_cut();
329242
if (r == lia_move::undef && should_gomory_cut()) r = gomory(lia).get_gomory_cuts(2);
330243
if (r == lia_move::undef && should_solve_dioph_eq()) r = solve_dioph_eq();

0 commit comments

Comments
 (0)