3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-03 12:51:22 +00:00

add quasi macro detection

This commit is contained in:
Nikolaj Bjorner 2023-01-06 19:53:55 -08:00
parent 25112e47b4
commit 95cb06d8cf
3 changed files with 170 additions and 5 deletions

View file

@ -55,6 +55,7 @@ public:
std::ostream& display(std::ostream& out) const;
unsigned size() const { return m_literals.size(); }
expr* atom(unsigned i) const { return m_literals[i].first; }
bool sign(unsigned i) const { return m_literals[i].second; }
bool is_unit() const { return m_literals.size() == 1; }
@ -91,6 +92,7 @@ private:
ast_mark m_disable_elimination, m_predicate_decls, m_is_macro;
ptr_vector<func_decl> m_predicates;
ptr_vector<expr> m_to_exclude;
ast_mark m_is_injective, m_is_surjective;
stats m_stats;
use_list m_use_list;
der_rewriter m_der;
@ -101,6 +103,8 @@ private:
clause* init_clause(unsigned i);
clause* init_clause(expr* f, expr_dependency* d, unsigned i);
void init_injective(clause const& cl);
void init_surjective(clause const& cl);
clause* resolve(func_decl* p, clause& pos, clause& neg);
void add_use_list(clause& cl);
@ -109,6 +113,7 @@ private:
void insert_macro(app* head, expr* def, expr_dependency* dep);
expr_ref bind_free_variables_in_def(clause& cl, app* head, expr* def);
bool can_be_macro_head(expr* head, unsigned num_bound);
void insert_quasi_macro(app* head, expr* body, clause const& cl);
bool can_be_quasi_macro_head(expr* head, unsigned num_bound);
bool is_macro_safe(expr* e);
void try_find_macro(clause& cl);