mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
use value function in lar_solver (#4771)
* use value function in lar_solver Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * add missing return Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * check_feasible is called after column is added for fixed variable Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * na
This commit is contained in:
parent
5335097768
commit
620204bbb4
7 changed files with 41 additions and 110 deletions
|
@ -615,6 +615,7 @@ namespace arith {
|
|||
add_def_constraint(ci);
|
||||
if (vi_equal != lp::null_lpvar)
|
||||
report_equality_of_fixed_vars(vi, vi_equal);
|
||||
m_new_eq = true;
|
||||
}
|
||||
|
||||
bool solver::reflect(expr* n) const {
|
||||
|
|
|
@ -798,9 +798,7 @@ namespace arith {
|
|||
}
|
||||
|
||||
rational solver::get_value(theory_var v) const {
|
||||
if (v == euf::null_theory_var || !lp().external_is_used(v))
|
||||
return rational::zero();
|
||||
return m_solver->get_value(get_tv(v));
|
||||
return is_registered_var(v) ? m_solver->get_value(get_tv(v)) : rational::zero();
|
||||
}
|
||||
|
||||
void solver::random_update() {
|
||||
|
|
|
@ -232,6 +232,7 @@ namespace bv {
|
|||
expr_ref b2b(bv.mk_bit2bool(e, i), m);
|
||||
m_bits[v].push_back(sat::null_literal);
|
||||
sat::literal lit = ctx.internalize(b2b, false, false, m_is_redundant);
|
||||
(void)lit;
|
||||
TRACE("bv", tout << "add-bit: " << lit << " " << literal2expr(lit) << "\n";);
|
||||
SASSERT(m_bits[v].back() == lit);
|
||||
}
|
||||
|
|
|
@ -67,7 +67,6 @@ namespace euf {
|
|||
}
|
||||
|
||||
class solver::user_sort {
|
||||
solver& s;
|
||||
ast_manager& m;
|
||||
model_ref& mdl;
|
||||
expr_ref_vector& values;
|
||||
|
@ -76,7 +75,7 @@ namespace euf {
|
|||
obj_map<sort, expr_ref_vector*> sort2values;
|
||||
public:
|
||||
user_sort(solver& s, expr_ref_vector& values, model_ref& mdl):
|
||||
s(s), m(s.m), mdl(mdl), values(values), factory(m) {}
|
||||
m(s.m), mdl(mdl), values(values), factory(m) {}
|
||||
|
||||
~user_sort() {
|
||||
for (auto kv : sort2values)
|
||||
|
|
|
@ -59,7 +59,6 @@ namespace user {
|
|||
vector<prop_info> m_prop;
|
||||
unsigned_vector m_prop_lim;
|
||||
vector<sat::literal_vector> m_id2justification;
|
||||
unsigned m_num_scopes { 0 };
|
||||
sat::literal_vector m_lits;
|
||||
euf::enode_pair_vector m_eqs;
|
||||
stats m_stats;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue