3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00

exposing user propagators over .Net

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2022-05-07 11:08:40 -07:00
parent 3ae781039b
commit 14214c5a07
7 changed files with 296 additions and 18 deletions

View file

@ -195,8 +195,10 @@ public:
void operator()(app* a)
{
if (a->get_family_id() == null_family_id && m_au.is_array(a)) {
if (m_sort && m_sort != a->get_sort()) { return; }
if (!m_sort) { m_sort = a->get_sort(); }
if (m_sort && m_sort != a->get_sort())
return;
if (!m_sort)
m_sort = a->get_sort();
m_symbs.insert(a->get_decl());
}
}
@ -208,16 +210,10 @@ public:
bool lemma_array_eq_generalizer::is_array_eq (ast_manager &m, expr* e) {
expr *e1 = nullptr, *e2 = nullptr;
if (m.is_eq(e, e1, e2) && is_app(e1) && is_app(e2)) {
app *a1 = to_app(e1);
app *a2 = to_app(e2);
array_util au(m);
if (a1->get_family_id() == null_family_id &&
a2->get_family_id() == null_family_id &&
au.is_array(a1) && au.is_array(a2))
return true;
}
return false;
array_util au(m);
return m.is_eq(e, e1, e2) &&
is_uninterp(e1) && is_uninterp(e2) &&
au.is_array(e1) && au.is_array(e2);
}
void lemma_array_eq_generalizer::operator() (lemma_ref &lemma)