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

Merge pull request #882 from dwoos/sine-filter

Add basic Sine Qua Non filtering
This commit is contained in:
Christoph M. Wintersteiger 2017-02-04 20:24:09 +00:00 committed by GitHub
commit c56edc63d2
5 changed files with 296 additions and 0 deletions

View file

@ -2326,6 +2326,22 @@ bool ast_manager::is_pattern(expr const * n) const {
return true;
}
bool ast_manager::is_pattern(expr const * n, ptr_vector<expr> &args) {
if (!is_app_of(n, m_pattern_family_id, OP_PATTERN)) {
return false;
}
for (unsigned i = 0; i < to_app(n)->get_num_args(); ++i) {
expr *arg = to_app(n)->get_arg(i);
if (!is_app(arg)) {
return false;
}
args.push_back(arg);
}
return true;
}
quantifier * ast_manager::mk_quantifier(bool forall, unsigned num_decls, sort * const * decl_sorts, symbol const * decl_names,
expr * body, int weight , symbol const & qid, symbol const & skid,
unsigned num_patterns, expr * const * patterns,

View file

@ -1840,6 +1840,8 @@ public:
bool is_pattern(expr const * n) const;
bool is_pattern(expr const *n, ptr_vector<expr> &args);
public:
quantifier * mk_quantifier(bool forall, unsigned num_decls, sort * const * decl_sorts, symbol const * decl_names, expr * body,