3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 20:05:51 +00:00

replace lean to lp

Signed-off-by: Lev Nachmanson <levnach@microsoft.com>
This commit is contained in:
Lev Nachmanson 2017-07-10 11:06:37 -07:00 committed by Lev Nachmanson
parent db0a3f4358
commit d41c65a4f9
72 changed files with 1334 additions and 1213 deletions

View file

@ -175,9 +175,9 @@ class mps_reader {
if (m_line[i] == ' ')
break;
}
SASSERT(m_line.size() >= offset);
SASSERT(m_line.size() >> i);
SASSERT(i >= offset);
lp_assert(m_line.size() >= offset);
lp_assert(m_line.size() >> i);
lp_assert(i >= offset);
return m_line.substr(offset, i - offset);
}
@ -512,7 +512,7 @@ class mps_reader {
void create_or_update_bound() {
const unsigned name_offset = 14;
SASSERT(m_line.size() >= 14);
lp_assert(m_line.size() >= 14);
vector<std::string> bound_string = split_and_trim(m_line.substr(name_offset, m_line.size()));
if (bound_string.size() == 0) {
@ -618,7 +618,7 @@ class mps_reader {
}
for (auto s : row_with_range->m_row_columns) {
SASSERT(m_columns.find(s.first) != m_columns.end());
lp_assert(m_columns.find(s.first) != m_columns.end());
other_bound_range_row->m_row_columns[s.first] = s.second;
}
}
@ -694,7 +694,7 @@ class mps_reader {
if (row->m_name != m_cost_row_name) {
solver->add_constraint(get_relation_from_row(row->m_type), row->m_right_side, row->m_index);
for (auto s : row->m_row_columns) {
SASSERT(m_columns.find(s.first) != m_columns.end());
lp_assert(m_columns.find(s.first) != m_columns.end());
solver->set_row_column_coefficient(row->m_index, m_columns[s.first]->m_index, s.second);
}
} else {
@ -729,7 +729,7 @@ class mps_reader {
void set_solver_cost(row * row, lp_solver<T, X> *solver) {
for (auto s : row->m_row_columns) {
std::string name = s.first;
SASSERT(m_columns.find(name) != m_columns.end());
lp_assert(m_columns.find(name) != m_columns.end());
mps_reader::column * col = m_columns[name];
solver->set_cost_for_column(col->m_index, s.second);
}
@ -738,7 +738,7 @@ class mps_reader {
public:
void set_message_stream(std::ostream * o) {
SASSERT(o != nullptr);
lp_assert(o != nullptr);
m_message_stream = o;
}
vector<std::string> column_names() {