mirror of
https://github.com/Z3Prover/z3
synced 2025-08-26 13:06:05 +00:00
change the add_var_bound() signature
Signed-off-by: Lev <levnach@hotmail.com>
This commit is contained in:
parent
1c8f28c2e9
commit
c9be7b89c1
6 changed files with 367 additions and 122 deletions
|
@ -386,17 +386,17 @@ namespace lp {
|
|||
return ret;
|
||||
}
|
||||
|
||||
void add_constraint_to_solver(lar_solver * solver, formula_constraint & fc) {
|
||||
void add_constraint_to_solver(lar_solver * solver, formula_constraint & fc, explanation& e) {
|
||||
vector<std::pair<mpq, var_index>> ls;
|
||||
for (auto & it : fc.m_coeffs) {
|
||||
ls.push_back(std::make_pair(it.first, solver->add_var(register_name(it.second), false)));
|
||||
}
|
||||
solver->add_constraint(ls, fc.m_kind, fc.m_right_side);
|
||||
solver->add_constraint(ls, fc.m_kind, fc.m_right_side, e);
|
||||
}
|
||||
|
||||
explanation e;
|
||||
void fill_lar_solver(lar_solver * solver) {
|
||||
for (formula_constraint & fc : m_constraints)
|
||||
add_constraint_to_solver(solver, fc);
|
||||
add_constraint_to_solver(solver, fc, e);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue