mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
* fixing #4670 Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * init Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * arrays Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * arrays Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * arrays Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * na Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
ee00542e76
commit
cfa7c733db
48 changed files with 1591 additions and 359 deletions
|
@ -451,7 +451,7 @@ namespace {
|
|||
if (p->is_ground()) {
|
||||
enode * e = get_enode(*m_context, p);
|
||||
SASSERT(e->has_lbl_hash());
|
||||
out << "#" << e->get_owner_id() << ":" << e->get_lbl_hash() << " ";
|
||||
out << "#" << e->get_expr_id() << ":" << e->get_lbl_hash() << " ";
|
||||
}
|
||||
else {
|
||||
out << p->get_decl()->get_name() << ":" << m_lbl_hasher(p->get_decl()) << " ";
|
||||
|
@ -2240,7 +2240,7 @@ namespace {
|
|||
out << "nil\n";
|
||||
}
|
||||
else {
|
||||
out << "#" << n->get_owner_id() << ", root: " << n->get_root()->get_owner_id();
|
||||
out << "#" << n->get_expr_id() << ", root: " << n->get_root()->get_expr_id();
|
||||
if (m_use_filters)
|
||||
out << ", lbls: " << n->get_root()->get_lbls() << " ";
|
||||
out << "\n";
|
||||
|
@ -3940,7 +3940,7 @@ namespace {
|
|||
TRACE("missing_instance",
|
||||
tout << "qa:\n" << mk_ll_pp(qa, m) << "\npat:\n" << mk_ll_pp(pat, m);
|
||||
for (unsigned i = 0; i < num_bindings; i++)
|
||||
tout << "#" << bindings[i]->get_owner_id() << "\n" << mk_ll_pp(bindings[i]->get_owner(), m) << "\n";
|
||||
tout << "#" << bindings[i]->get_expr_id() << "\n" << mk_ll_pp(bindings[i]->get_owner(), m) << "\n";
|
||||
);
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
|
|
@ -51,9 +51,9 @@ void smt_params::updt_local_params(params_ref const & _p) {
|
|||
m_logic = _p.get_sym("logic", m_logic);
|
||||
m_string_solver = p.string_solver();
|
||||
if (_p.get_bool("arith.greatest_error_pivot", false))
|
||||
m_arith_pivot_strategy = ARITH_PIVOT_GREATEST_ERROR;
|
||||
m_arith_pivot_strategy = arith_pivot_strategy::ARITH_PIVOT_GREATEST_ERROR;
|
||||
else if (_p.get_bool("arith.least_error_pivot", false))
|
||||
m_arith_pivot_strategy = ARITH_PIVOT_LEAST_ERROR;
|
||||
m_arith_pivot_strategy = arith_pivot_strategy::ARITH_PIVOT_LEAST_ERROR;
|
||||
theory_array_params::updt_params(_p);
|
||||
m_dump_benchmarks = false;
|
||||
m_dump_min_time = 0.5;
|
||||
|
|
|
@ -42,12 +42,14 @@ enum arith_prop_strategy {
|
|||
ARITH_PROP_PROPORTIONAL
|
||||
};
|
||||
|
||||
enum arith_pivot_strategy {
|
||||
enum class arith_pivot_strategy {
|
||||
ARITH_PIVOT_SMALLEST,
|
||||
ARITH_PIVOT_GREATEST_ERROR,
|
||||
ARITH_PIVOT_LEAST_ERROR
|
||||
};
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& out, arith_pivot_strategy st) { return out << (int)st; }
|
||||
|
||||
struct theory_arith_params {
|
||||
bool m_arith_eq2ineq;
|
||||
bool m_arith_process_all_eqs;
|
||||
|
@ -141,7 +143,7 @@ struct theory_arith_params {
|
|||
m_arith_adaptive_gcd(false),
|
||||
m_arith_propagation_threshold(UINT_MAX),
|
||||
m_arith_bounded_expansion(false),
|
||||
m_arith_pivot_strategy(ARITH_PIVOT_SMALLEST),
|
||||
m_arith_pivot_strategy(arith_pivot_strategy::ARITH_PIVOT_SMALLEST),
|
||||
m_arith_add_binary_bounds(false),
|
||||
m_arith_propagation_strategy(ARITH_PROP_PROPORTIONAL),
|
||||
m_arith_eq_bounds(false),
|
||||
|
|
|
@ -1279,9 +1279,9 @@ namespace smt {
|
|||
SASSERT(e_internalized(arg));
|
||||
enode * _arg = get_enode(arg);
|
||||
CTRACE("eq_to_bug", args[i]->get_root() != _arg->get_root(),
|
||||
tout << "#" << args[i]->get_owner_id() << " #" << args[i]->get_root()->get_owner_id()
|
||||
<< " #" << _arg->get_owner_id() << " #" << _arg->get_root()->get_owner_id() << "\n";
|
||||
tout << "#" << r->get_owner_id() << "\n";
|
||||
tout << "#" << args[i]->get_expr_id() << " #" << args[i]->get_root()->get_expr_id()
|
||||
<< " #" << _arg->get_expr_id() << " #" << _arg->get_root()->get_expr_id() << "\n";
|
||||
tout << "#" << r->get_expr_id() << "\n";
|
||||
display(tout););
|
||||
SASSERT(args[i]->get_root() == _arg->get_root());
|
||||
}
|
||||
|
@ -2749,8 +2749,8 @@ namespace smt {
|
|||
char const* tag[9] = { ":restarts ", ":conflicts ", ":decisions ", ":propagations ", ":clauses/bin ", ":lemmas ", ":simplify ", ":deletions", ":memory" };
|
||||
|
||||
std::stringstream l1, l2;
|
||||
l1 << "(sat.stats ";
|
||||
l2 << "(sat.stats ";
|
||||
l1 << "(smt.stats ";
|
||||
l2 << "(smt.stats ";
|
||||
size_t p1 = 11, p2 = 11;
|
||||
SASSERT(offsets.size() == 9);
|
||||
for (unsigned i = 0; i < offsets.size(); ++i) {
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace smt {
|
|||
(!is_true_eq && (!n->is_cgc_enabled() || n->is_cgr() == (m_cg_table.contains_ptr(n)))) ||
|
||||
(is_true_eq && !m_cg_table.contains_ptr(n));
|
||||
CTRACE("check_enode", !cg_inv,
|
||||
tout << "n: #" << n->get_owner_id() << ", m_cg: #" << n->m_cg->get_owner_id() << ", contains: " << m_cg_table.contains(n) << "\n"; display(tout););
|
||||
tout << "n: #" << n->get_expr_id() << ", m_cg: #" << n->m_cg->get_expr_id() << ", contains: " << m_cg_table.contains(n) << "\n"; display(tout););
|
||||
SASSERT(cg_inv);
|
||||
return true;
|
||||
}
|
||||
|
@ -235,8 +235,8 @@ namespace smt {
|
|||
if (m.is_bool(e->get_owner())) {
|
||||
enode * r = e->get_root();
|
||||
CTRACE("eqc_bool", get_assignment(e) != get_assignment(r),
|
||||
tout << "#" << e->get_owner_id() << "\n" << mk_pp(e->get_owner(), m) << "\n";
|
||||
tout << "#" << r->get_owner_id() << "\n" << mk_pp(r->get_owner(), m) << "\n";
|
||||
tout << "#" << e->get_expr_id() << "\n" << mk_pp(e->get_owner(), m) << "\n";
|
||||
tout << "#" << r->get_expr_id() << "\n" << mk_pp(r->get_owner(), m) << "\n";
|
||||
tout << "assignments: " << get_assignment(e) << " " << get_assignment(r) << "\n";
|
||||
display(tout););
|
||||
SASSERT(get_assignment(e) == get_assignment(r));
|
||||
|
@ -271,7 +271,7 @@ namespace smt {
|
|||
if (has_enode(v)) {
|
||||
enode * n = bool_var2enode(v);
|
||||
if (n->is_eq() && is_relevant(n) && get_assignment(v) == l_false && !m.is_iff(n->get_owner())) {
|
||||
TRACE("check_th_diseq_propagation", tout << "checking: #" << n->get_owner_id() << " " << mk_bounded_pp(n->get_owner(), m) << "\n";);
|
||||
TRACE("check_th_diseq_propagation", tout << "checking: #" << n->get_expr_id() << " " << mk_bounded_pp(n->get_owner(), m) << "\n";);
|
||||
enode * lhs = n->get_arg(0)->get_root();
|
||||
enode * rhs = n->get_arg(1)->get_root();
|
||||
if (rhs->is_interpreted() && lhs->is_interpreted())
|
||||
|
@ -305,9 +305,9 @@ namespace smt {
|
|||
CTRACE("check_th_diseq_propagation", !found,
|
||||
tout
|
||||
<< "checking theory: " << m.get_family_name(th_id) << "\n"
|
||||
<< "root: #" << n->get_root()->get_owner_id() << " node: #" << n->get_owner_id() << "\n"
|
||||
<< "root: #" << n->get_root()->get_expr_id() << " node: #" << n->get_expr_id() << "\n"
|
||||
<< mk_pp(n->get_owner(), m) << "\n"
|
||||
<< "lhs: #" << lhs->get_owner_id() << ", rhs: #" << rhs->get_owner_id() << "\n"
|
||||
<< "lhs: #" << lhs->get_expr_id() << ", rhs: #" << rhs->get_expr_id() << "\n"
|
||||
<< mk_bounded_pp(lhs->get_owner(), m) << " " << mk_bounded_pp(rhs->get_owner(), m) << "\n";);
|
||||
VERIFY(found);
|
||||
}
|
||||
|
@ -325,8 +325,8 @@ namespace smt {
|
|||
enode * n2 = p.second;
|
||||
if (n1->get_root() == n2->get_root()) {
|
||||
TRACE("diseq_bug",
|
||||
tout << "n1: #" << n1->get_owner_id() << ", n2: #" << n2->get_owner_id() <<
|
||||
", r: #" << n1->get_root()->get_owner_id() << "\n";
|
||||
tout << "n1: #" << n1->get_expr_id() << ", n2: #" << n2->get_expr_id() <<
|
||||
", r: #" << n1->get_root()->get_expr_id() << "\n";
|
||||
tout << "n1 parents:\n"; display_parent_eqs(tout, n1);
|
||||
tout << "n2 parents:\n"; display_parent_eqs(tout, n2);
|
||||
tout << "r parents:\n"; display_parent_eqs(tout, n1->get_root());
|
||||
|
|
|
@ -2278,9 +2278,9 @@ namespace smt {
|
|||
if (m_blands_rule)
|
||||
return select_smallest_var();
|
||||
switch (m_params.m_arith_pivot_strategy) {
|
||||
case ARITH_PIVOT_GREATEST_ERROR:
|
||||
case arith_pivot_strategy::ARITH_PIVOT_GREATEST_ERROR:
|
||||
return select_greatest_error_var();
|
||||
case ARITH_PIVOT_LEAST_ERROR:
|
||||
case arith_pivot_strategy::ARITH_PIVOT_LEAST_ERROR:
|
||||
return select_least_error_var();
|
||||
default:
|
||||
return select_smallest_var();
|
||||
|
|
|
@ -495,7 +495,7 @@ namespace smt {
|
|||
if (ctx.is_relevant(n) && ctx.is_shared(n)) {
|
||||
enode * r = n->get_root();
|
||||
if (!r->is_marked() && is_array_sort(r)) {
|
||||
TRACE("array_shared", tout << "new shared var: #" << r->get_owner_id() << "\n";);
|
||||
TRACE("array_shared", tout << "new shared var: #" << r->get_expr_id() << "\n";);
|
||||
r->set_mark();
|
||||
to_unmark.push_back(r);
|
||||
theory_var r_th_var = r->get_var(get_id());
|
||||
|
|
|
@ -2083,8 +2083,8 @@ void theory_seq::validate_model(model& mdl) {
|
|||
enode* rn = ensure_enode(r);
|
||||
IF_VERBOSE(0, verbose_stream() << "bad representation: " << l << " ->\n" << r << "\nbut\n"
|
||||
<< mdl(l) << "\n->\n" << mdl(r) << "\n"
|
||||
<< "nodes: #" << ln->get_owner_id() << " #" << rn->get_owner_id() << "\n"
|
||||
<< "roots: #" << ln->get_root()->get_owner_id() << " #" << rn->get_root()->get_owner_id() << "\n";
|
||||
<< "nodes: #" << ln->get_expr_id() << " #" << rn->get_expr_id() << "\n"
|
||||
<< "roots: #" << ln->get_root()->get_expr_id() << " #" << rn->get_root()->get_expr_id() << "\n";
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue