mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
update display method for datalog to use predicates, throttle use of extensionality
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
847607bda7
commit
2115111dac
3 changed files with 71 additions and 17 deletions
|
@ -573,12 +573,12 @@ bool theory_seq::check_extensionality() {
|
|||
unsigned sz = get_num_vars();
|
||||
unsigned_vector seqs;
|
||||
for (unsigned v = 0; v < sz; ++v) {
|
||||
enode* n = get_enode(v);
|
||||
expr* o1 = n->get_owner();
|
||||
if (n != n->get_root()) {
|
||||
enode* n1 = get_enode(v);
|
||||
expr* o1 = n1->get_owner();
|
||||
if (n1 != n1->get_root()) {
|
||||
continue;
|
||||
}
|
||||
if (!seqs.empty() && ctx.is_relevant(n) && m_util.is_seq(o1) && ctx.is_shared(n)) {
|
||||
if (!seqs.empty() && ctx.is_relevant(n1) && m_util.is_seq(o1) && ctx.is_shared(n1)) {
|
||||
dependency* dep = 0;
|
||||
expr_ref e1 = canonize(o1, dep);
|
||||
for (unsigned i = 0; i < seqs.size(); ++i) {
|
||||
|
@ -587,7 +587,7 @@ bool theory_seq::check_extensionality() {
|
|||
if (m.get_sort(o1) != m.get_sort(o2)) {
|
||||
continue;
|
||||
}
|
||||
if (m_exclude.contains(o1, o2)) {
|
||||
if (ctx.is_diseq(n1, n2) || m_exclude.contains(o1, o2)) {
|
||||
continue;
|
||||
}
|
||||
expr_ref e2 = canonize(n2->get_owner(), dep);
|
||||
|
@ -597,8 +597,17 @@ bool theory_seq::check_extensionality() {
|
|||
m_exclude.update(o1, o2);
|
||||
continue;
|
||||
}
|
||||
bool excluded = false;
|
||||
for (unsigned j = 0; !excluded && j < m_lhs.size(); ++j) {
|
||||
if (m_exclude.contains(m_lhs[j].get(), m_rhs[j].get())) {
|
||||
excluded = true;
|
||||
}
|
||||
}
|
||||
if (excluded) {
|
||||
continue;
|
||||
}
|
||||
TRACE("seq", tout << mk_pp(o1, m) << " = " << mk_pp(o2, m) << "\n";);
|
||||
ctx.assume_eq(n, n2);
|
||||
ctx.assume_eq(n1, n2);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue