3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-07 18:05:21 +00:00

add match for foldli

This commit is contained in:
Nikolaj Bjorner 2022-09-10 16:02:11 -07:00
parent 660bdc33e3
commit 0629353fdc
2 changed files with 8 additions and 0 deletions

View file

@ -531,6 +531,13 @@ public:
#endif
};
#define MATCH_QUATARY(_MATCHER_) \
bool _MATCHER_(expr const* n, expr*& a1, expr*& a2, expr *& a3, expr *& a4) const { \
if (_MATCHER_(n) && to_app(n)->get_num_args() == 4) { \
a1 = to_app(n)->get_arg(0); a2 = to_app(n)->get_arg(1); a3 = to_app(n)->get_arg(2); a4 = to_app(n)->get_arg(3); return true; } \
return false; \
}
#define MATCH_TERNARY(_MATCHER_) \
bool _MATCHER_(expr const* n, expr*& a1, expr*& a2, expr *& a3) const { \
if (_MATCHER_(n) && to_app(n)->get_num_args() == 3) { \

View file

@ -403,6 +403,7 @@ public:
MATCH_BINARY(is_map);
MATCH_TERNARY(is_mapi);
MATCH_TERNARY(is_foldl);
MATCH_QUATARY(is_foldli);
MATCH_BINARY(is_last_index);
MATCH_TERNARY(is_replace);
MATCH_TERNARY(is_replace_re);