diff --git a/src/ast/ast.h b/src/ast/ast.h index d8eb072e374..51250122670 100644 --- a/src/ast/ast.h +++ b/src/ast/ast.h @@ -531,6 +531,13 @@ class ast { #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) { \ diff --git a/src/ast/seq_decl_plugin.h b/src/ast/seq_decl_plugin.h index 30b4a9fb3aa..c6550d33aad 100644 --- a/src/ast/seq_decl_plugin.h +++ b/src/ast/seq_decl_plugin.h @@ -403,6 +403,7 @@ class seq_util { 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);