From 2c2ab0d57a5aed0480dda3e0d98ae4c2590d35ba Mon Sep 17 00:00:00 2001 From: Jakob Rath Date: Mon, 1 Aug 2022 14:59:12 +0200 Subject: [PATCH] Additional BV matchers --- src/ast/bv_decl_plugin.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/ast/bv_decl_plugin.h b/src/ast/bv_decl_plugin.h index 372eedb8e..60efc73a9 100644 --- a/src/ast/bv_decl_plugin.h +++ b/src/ast/bv_decl_plugin.h @@ -342,6 +342,14 @@ public: bool is_bv_not(expr const * e) const { return is_app_of(e, get_fid(), OP_BNOT); } bool is_bv_ule(expr const * e) const { return is_app_of(e, get_fid(), OP_ULEQ); } bool is_bv_sle(expr const * e) const { return is_app_of(e, get_fid(), OP_SLEQ); } + bool is_ule(expr const * e) const { return is_app_of(e, get_fid(), OP_ULEQ); } + bool is_sle(expr const * e) const { return is_app_of(e, get_fid(), OP_SLEQ); } + bool is_ult(expr const * e) const { return is_app_of(e, get_fid(), OP_ULT); } + bool is_slt(expr const * e) const { return is_app_of(e, get_fid(), OP_SLT); } + bool is_ugt(expr const * e) const { return is_app_of(e, get_fid(), OP_UGT); } + bool is_sgt(expr const * e) const { return is_app_of(e, get_fid(), OP_SGT); } + bool is_uge(expr const * e) const { return is_app_of(e, get_fid(), OP_UGEQ); } + bool is_sge(expr const * e) const { return is_app_of(e, get_fid(), OP_SGEQ); } bool is_bit2bool(expr const * e) const { return is_app_of(e, get_fid(), OP_BIT2BOOL); } bool is_bv2int(expr const* e) const { return is_app_of(e, get_fid(), OP_BV2INT); } bool is_int2bv(expr const* e) const { return is_app_of(e, get_fid(), OP_INT2BV); } @@ -355,9 +363,19 @@ public: MATCH_UNARY(is_bv_not); MATCH_BINARY(is_bv_add); + MATCH_BINARY(is_bv_sub); MATCH_BINARY(is_bv_mul); MATCH_BINARY(is_bv_sle); MATCH_BINARY(is_bv_ule); + MATCH_BINARY(is_ule); + MATCH_BINARY(is_sle); + MATCH_BINARY(is_ult); + MATCH_BINARY(is_slt); + MATCH_BINARY(is_uge); + MATCH_BINARY(is_sge); + MATCH_BINARY(is_ugt); + MATCH_BINARY(is_sgt); + MATCH_BINARY(is_bv_umul_no_ovfl); MATCH_BINARY(is_bv_ashr); MATCH_BINARY(is_bv_lshr); MATCH_BINARY(is_bv_shl);