3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-16 10:56:16 +00:00

synchronize fork

This commit is contained in:
nilsbecker 2018-07-06 16:17:56 +02:00 committed by nilsbecker
commit 820c14ed06
430 changed files with 19930 additions and 13462 deletions

View file

@ -52,10 +52,7 @@ namespace smt {
bool quick_checker::collector::check_arg(enode * n, func_decl * f, unsigned i) {
if (!f || !m_conservative)
return true;
enode_vector::const_iterator it = m_context.begin_enodes_of(f);
enode_vector::const_iterator end = m_context.end_enodes_of(f);
for (; it != end; ++it) {
enode * curr = *it;
for (enode * curr : m_context.enodes_of(f)) {
if (m_context.is_relevant(curr) && curr->is_cgr() && i < curr->get_num_args() && curr->get_arg(i)->get_root() == n->get_root())
return true;
}
@ -77,10 +74,7 @@ namespace smt {
if (s.empty())
continue;
ns.reset();
enode_vector::const_iterator it = m_context.begin_enodes_of(f);
enode_vector::const_iterator end = m_context.end_enodes_of(f);
for (; it != end; ++it) {
enode * curr = *it;
for (enode * curr : m_context.enodes_of(f)) {
if (m_context.is_relevant(curr) && curr->is_cgr() && check_arg(curr, p, i) && j < curr->get_num_args()) {
enode * arg = curr->get_arg(j)->get_root();
// intersection
@ -94,10 +88,7 @@ namespace smt {
else {
m_already_found[idx] = true;
enode_set & s = m_candidates[idx];
enode_vector::const_iterator it = m_context.begin_enodes_of(f);
enode_vector::const_iterator end = m_context.end_enodes_of(f);
for (; it != end; ++it) {
enode * curr = *it;
for (enode * curr : m_context.enodes_of(f)) {
if (m_context.is_relevant(curr) && curr->is_cgr() && check_arg(curr, p, i) && j < curr->get_num_args()) {
enode * arg = curr->get_arg(j)->get_root();
s.insert(arg);
@ -134,10 +125,7 @@ namespace smt {
enode_vector & v = candidates[i];
v.reset();
enode_set & s = m_candidates[i];
enode_set::iterator it = s.begin();
enode_set::iterator end = s.end();
for (; it != end; ++it) {
enode * curr = *it;
for (enode * curr : s) {
v.push_back(curr);
}
}
@ -146,10 +134,8 @@ namespace smt {
for (unsigned i = 0; i < m_num_vars; i++) {
tout << "var " << i << ":";
enode_vector & v = candidates[i];
enode_vector::iterator it = v.begin();
enode_vector::iterator end = v.end();
for (; it != end; ++it)
tout << " #" << (*it)->get_owner_id();
for (enode * n : v)
tout << " #" << n->get_owner_id();
tout << "\n";
});
}
@ -227,10 +213,8 @@ namespace smt {
tout << "candidates:\n";
for (unsigned i = 0; i < m_num_bindings; i++) {
enode_vector & v = m_candidate_vectors[i];
enode_vector::iterator it = v.begin();
enode_vector::iterator end = v.end();
for (; it != end; ++it)
tout << "#" << (*it)->get_owner_id() << " ";
for (enode * n : v)
tout << "#" << n->get_owner_id() << " ";
tout << "\n";
});
bool result = false;
@ -252,7 +236,8 @@ namespace smt {
TRACE("quick_checker_sizes", tout << "found new candidate\n";
for (unsigned i = 0; i < m_num_bindings; i++) tout << "#" << m_bindings[i]->get_owner_id() << " "; tout << "\n";);
unsigned max_generation = get_max_generation(m_num_bindings, m_bindings.c_ptr());
if (m_context.add_instance(q, nullptr /* no pattern was used */, m_num_bindings, m_bindings.c_ptr(), max_generation,
if (m_context.add_instance(q, nullptr /* no pattern was used */, m_num_bindings, m_bindings.c_ptr(), nullptr,
max_generation,
0, // min_top_generation is only available for instances created by the MAM
0, // max_top_generation is only available for instances created by the MAM
empty_used_enodes))