3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-04 02:10:23 +00:00

Eliminated the dependency of the macro-finder on the simplifier.

This commit is contained in:
Christoph M. Wintersteiger 2017-08-24 20:34:11 +01:00
parent ed8c11ff76
commit 8310b24c52
8 changed files with 168 additions and 139 deletions

View file

@ -20,8 +20,7 @@ Revision History:
#define MACRO_FINDER_H_
#include "ast/macros/macro_manager.h"
#include "ast/simplifier/arith_simplifier_plugin.h"
#include "ast/macros/macro_util.h"
bool is_macro_head(expr * n, unsigned num_decls);
bool is_simple_macro(ast_manager & m, expr * n, unsigned num_decls, obj_hashtable<func_decl> const * forbidden_set, app * & head, expr * & def);
@ -34,16 +33,15 @@ inline bool is_simple_macro(ast_manager & m, expr * n, unsigned num_decls, app *
as macros.
*/
class macro_finder {
ast_manager & m_manager;
ast_manager & m_manager;
macro_manager & m_macro_manager;
macro_util & m_util;
arith_simplifier_plugin * get_arith_simp() { return m_util.get_arith_simp(); }
bool expand_macros(unsigned num, expr * const * exprs, proof * const * prs, expr_ref_vector & new_exprs, proof_ref_vector & new_prs);
bool is_arith_macro(expr * n, proof * pr, expr_ref_vector & new_exprs, proof_ref_vector & new_prs);
bool is_macro(expr * n, app_ref & head, expr_ref & def);
bool is_pseudo_head(expr * n, unsigned num_decls, app * & head, app * & t);
bool is_pseudo_predicate_macro(expr * n, app * & head, app * & t, expr * & def);
bool expand_macros(unsigned num, expr * const * exprs, proof * const * prs, expr_ref_vector & new_exprs, proof_ref_vector & new_prs);
bool is_arith_macro(expr * n, proof * pr, expr_ref_vector & new_exprs, proof_ref_vector & new_prs) const;
bool is_macro(expr * n, app_ref & head, expr_ref & def) const;
bool is_pseudo_head(expr * n, unsigned num_decls, app * & head, app * & t) const;
bool is_pseudo_predicate_macro(expr * n, app * & head, app * & t, expr * & def) const;
public:
macro_finder(ast_manager & m, macro_manager & mm);
@ -52,4 +50,3 @@ public:
};
#endif /* MACRO_FINDER_H_ */