3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 09:35:32 +00:00

add and use new is_pattern recognizer

This commit is contained in:
Doug Woos 2017-02-01 16:21:15 -08:00
parent 44c417904b
commit d6fbfe401e
3 changed files with 22 additions and 2 deletions

View file

@ -111,10 +111,12 @@ private:
bool matched = false;
for (int i = 0; i < q->get_num_patterns(); i++) {
bool p_matched = true;
vector<expr *> stack;
ptr_vector<expr> stack;
expr *curr;
// patterns are wrapped with "pattern"
stack.push_back(to_app(q->get_pattern(i))->get_arg(0));
if (!m.is_pattern(q->get_pattern(i), stack)) {
continue;
}
while (!stack.empty()) {
curr = stack.back();
stack.pop_back();