Skip to content

Commit a09e412

Browse files
committed
cleaning up
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
1 parent 6ce0fcd commit a09e412

File tree

2 files changed

+5
-55
lines changed

2 files changed

+5
-55
lines changed

src/nlsat/nlsat_explain.cpp

+4-54
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ namespace nlsat {
4545
bool m_minimize_cores;
4646
bool m_factor;
4747
bool m_signed_project;
48-
bool m_cell_sample;
48+
bool m_cell_sample;
4949

5050

5151
struct todo_set {
@@ -677,12 +677,6 @@ namespace nlsat {
677677
void psc_resultant_sample(polynomial_ref_vector &ps, var x, polynomial_ref_vector & samples){
678678
polynomial_ref p(m_pm);
679679
polynomial_ref q(m_pm);
680-
681-
682-
// polynomial_ref_vector samples(m_pm);
683-
// samples.reset();
684-
// sample_poly(ps, x, samples);
685-
686680
SASSERT(samples.size() <= 2);
687681

688682
for (unsigned i = 0; i < ps.size(); i++){
@@ -1088,28 +1082,6 @@ namespace nlsat {
10881082
all_lt = false;
10891083
break;
10901084
}
1091-
// else if (s < 0) {
1092-
// // y_val < roots[i]
1093-
1094-
// // check if roots[i] is a better upper bound
1095-
// if (upper_inf || m_am.lt(roots[i], upper)) {
1096-
// upper_inf = false;
1097-
// m_am.set(upper, roots[i]);
1098-
// p_upper = p;
1099-
// i_upper = i+1;
1100-
// }
1101-
// }
1102-
// else if (s > 0) {
1103-
// // roots[i] < y_val
1104-
1105-
// // check if roots[i] is a better lower bound
1106-
// if (lower_inf || m_am.lt(lower, roots[i])) {
1107-
// lower_inf = false;
1108-
// m_am.set(lower, roots[i]);
1109-
// p_lower = p;
1110-
// i_lower = i+1;
1111-
// }
1112-
// }
11131085
}
11141086
if (all_lt && num_roots > 0) {
11151087
int j = num_roots - 1;
@@ -1214,28 +1186,6 @@ namespace nlsat {
12141186
all_lt = false;
12151187
break;
12161188
}
1217-
// else if (s < 0) {
1218-
// // y_val < roots[i]
1219-
1220-
// // check if roots[i] is a better upper bound
1221-
// if (upper_inf || m_am.lt(roots[i], upper)) {
1222-
// upper_inf = false;
1223-
// m_am.set(upper, roots[i]);
1224-
// p_upper = p;
1225-
// i_upper = i+1;
1226-
// }
1227-
// }
1228-
// else if (s > 0) {
1229-
// // roots[i] < y_val
1230-
1231-
// // check if roots[i] is a better lower bound
1232-
// if (lower_inf || m_am.lt(lower, roots[i])) {
1233-
// lower_inf = false;
1234-
// m_am.set(lower, roots[i]);
1235-
// p_lower = p;
1236-
// i_lower = i+1;
1237-
// }
1238-
// }
12391189
}
12401190
if (all_lt && num_roots > 0) {
12411191
int j = num_roots - 1;
@@ -1305,7 +1255,6 @@ namespace nlsat {
13051255
}
13061256
}
13071257
void project_cdcac(polynomial_ref_vector & ps, var max_x) {
1308-
// whz
13091258
bool first = true;
13101259

13111260

@@ -1362,6 +1311,7 @@ namespace nlsat {
13621311
cac_add_cell_lits(ps, x, samples);
13631312
}
13641313
}
1314+
13651315
void project(polynomial_ref_vector & ps, var max_x) {
13661316
if (m_cell_sample) {
13671317
project_cdcac(ps, max_x);
@@ -2197,8 +2147,8 @@ namespace nlsat {
21972147
};
21982148

21992149
explain::explain(solver & s, assignment const & x2v, polynomial::cache & u,
2200-
atom_vector const& atoms, atom_vector const& x2eq, evaluator & ev, bool is_sample) {
2201-
m_imp = alloc(imp, s, x2v, u, atoms, x2eq, ev, is_sample);
2150+
atom_vector const& atoms, atom_vector const& x2eq, evaluator & ev, bool use_cell_sample) {
2151+
m_imp = alloc(imp, s, x2v, u, atoms, x2eq, ev, use_cell_sample);
22022152
}
22032153

22042154
explain::~explain() {

src/nlsat/nlsat_explain.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace nlsat {
3434
imp * m_imp;
3535
public:
3636
explain(solver & s, assignment const & x2v, polynomial::cache & u,
37-
atom_vector const& atoms, atom_vector const& x2eq, evaluator & ev, bool is_sample);
37+
atom_vector const& atoms, atom_vector const& x2eq, evaluator & ev, bool use_cell_sample_proj);
3838

3939
~explain();
4040

0 commit comments

Comments
 (0)