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

tune q-eval and q-ematch

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2021-09-28 13:41:37 -07:00
parent 92c1b600c3
commit da124e4275
7 changed files with 119 additions and 36 deletions

View file

@ -18,9 +18,10 @@ Revision History:
--*/
#include "ast/ast.h"
#include "ast/expr_delta_pair.h"
#include "ast/has_free_vars.h"
#include "util/hashtable.h"
class contains_vars {
class contains_vars::imp {
typedef hashtable<expr_delta_pair, obj_hash<expr_delta_pair>, default_eq<expr_delta_pair> > cache;
cache m_cache;
svector<expr_delta_pair> m_todo;
@ -86,6 +87,18 @@ public:
}
};
contains_vars::contains_vars() {
m_imp = alloc(imp);
}
contains_vars::~contains_vars() {
dealloc(m_imp);
}
bool contains_vars::operator()(expr* e) {
return (*m_imp)(e);
}
bool has_free_vars(expr * n) {
contains_vars p;
return p(n);