3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-30 16:03:16 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-02-25 18:14:41 -08:00
parent 39f73fa595
commit 4ff940a29e
6 changed files with 86 additions and 22 deletions

View file

@ -753,6 +753,7 @@ namespace smt {
}
void setup::setup_lra_arith() {
// m_context.register_plugin(alloc(smt::theory_mi_arith, m_manager, m_params));
m_context.register_plugin(alloc(smt::theory_lra, m_manager, m_params));
}

View file

@ -3149,20 +3149,22 @@ public:
theory_lra::inf_eps value(theory_var v) {
lp::impq ival = get_ivalue(v);
return inf_eps(0, inf_rational(ival.x, ival.y));
return inf_eps(rational(0), inf_rational(ival.x, ival.y));
}
theory_lra::inf_eps maximize(theory_var v, expr_ref& blocker, bool& has_shared) {
lp::impq term_max;
lp::lp_status st;
lp::var_index vi = 0;
if (!can_get_bound(v)) {
TRACE("arith", tout << "cannot get bound for v" << v << "\n";);
st = lp::lp_status::UNBOUNDED;
}
else {
lp::var_index vi = m_theory_var2var_index[v];
vi = m_theory_var2var_index[v];
st = m_solver->maximize_term(vi, term_max);
}
TRACE("arith", display(tout << st << " v" << v << "\n"););
TRACE("arith", display(tout << st << " v" << v << " vi: " << vi << "\n"););
switch (st) {
case lp::lp_status::OPTIMAL: {
init_variable_values();