3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 19:05:51 +00:00

delay internalize (#4714)

* adding array solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* use default in model construction

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* debug delay internalization

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* bv

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* arrays

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* get rid of implied values and bounds

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* redo egraph

* remove out

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* remove files

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-09-28 19:24:16 -07:00 committed by GitHub
parent 25724401cf
commit 367e5fdd52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
60 changed files with 1343 additions and 924 deletions

View file

@ -16,10 +16,11 @@ Author:
--*/
#include "ast/euf/euf_enode.h"
#include "ast/euf/euf_egraph.h"
namespace euf {
void enode::invariant() {
void enode::invariant(egraph& g) {
unsigned class_size = 0;
bool found_root = false;
bool found_this = false;
@ -27,6 +28,7 @@ namespace euf {
VERIFY(c->m_root == m_root);
found_root |= c == m_root;
found_this |= c == this;
++class_size;
}
VERIFY(found_root);
VERIFY(found_this);
@ -34,20 +36,26 @@ namespace euf {
if (is_root()) {
VERIFY(!m_target);
for (enode* p : enode_parents(this)) {
if (!p->merge_enabled())
continue;
bool found = false;
for (enode* arg : enode_args(p)) {
found |= arg->get_root() == this;
}
CTRACE("euf", !found, tout << g.bpp(p) << " does not have a child with root: " << g.bpp(this) << "\n";);
VERIFY(found);
}
for (enode* c : enode_class(this)) {
if (c == this)
continue;
for (enode* p : enode_parents(c)) {
if (!p->merge_enabled())
continue;
bool found = false;
for (enode* q : enode_parents(this)) {
found |= p->congruent(q);
}
CTRACE("euf", !found, tout << "parent " << g.bpp(p) << " of " << g.bpp(c) << " is not congruent to a parent of " << g.bpp(this) << "\n";);
VERIFY(found);
}
}
@ -118,7 +126,6 @@ namespace euf {
prev->m_target = nullptr;
prev->m_justification = justification::axiom();
while (curr != nullptr) {
enode* new_curr = curr->m_target;
justification new_js = curr->m_justification;
curr->m_target = prev;
@ -128,4 +135,11 @@ namespace euf {
curr = new_curr;
}
}
bool enode::children_are_roots() const {
for (auto* child : enode_args(this))
if (!child->is_root())
return false;
return true;
}
}