@@ -3046,4 +3046,184 @@ inline verilog_package_scope_exprt &to_verilog_package_scope_expr(exprt &expr)
3046
3046
return static_cast <verilog_package_scope_exprt &>(expr);
3047
3047
}
3048
3048
3049
+ class reduction_and_exprt : public unary_predicate_exprt
3050
+ {
3051
+ public:
3052
+ explicit reduction_and_exprt (exprt _op)
3053
+ : unary_predicate_exprt(ID_reduction_and, std::move(_op))
3054
+ {
3055
+ }
3056
+ };
3057
+
3058
+ template <>
3059
+ inline bool can_cast_expr<reduction_and_exprt>(const exprt &expr)
3060
+ {
3061
+ reduction_and_exprt::check (expr);
3062
+ return expr.id () == ID_reduction_and;
3063
+ }
3064
+
3065
+ inline const reduction_and_exprt &to_reduction_and_expr (const exprt &expr)
3066
+ {
3067
+ PRECONDITION (expr.id () == ID_reduction_and);
3068
+ reduction_and_exprt::check (expr);
3069
+ return static_cast <const reduction_and_exprt &>(expr);
3070
+ }
3071
+
3072
+ inline reduction_and_exprt &to_reduction_and_expr (exprt &expr)
3073
+ {
3074
+ PRECONDITION (expr.id () == ID_reduction_and);
3075
+ reduction_and_exprt::check (expr);
3076
+ return static_cast <reduction_and_exprt &>(expr);
3077
+ }
3078
+
3079
+ class reduction_or_exprt : public unary_predicate_exprt
3080
+ {
3081
+ public:
3082
+ explicit reduction_or_exprt (exprt _op)
3083
+ : unary_predicate_exprt(ID_reduction_or, std::move(_op))
3084
+ {
3085
+ }
3086
+ };
3087
+
3088
+ template <>
3089
+ inline bool can_cast_expr<reduction_or_exprt>(const exprt &expr)
3090
+ {
3091
+ reduction_or_exprt::check (expr);
3092
+ return expr.id () == ID_reduction_or;
3093
+ }
3094
+
3095
+ inline const reduction_or_exprt &to_reduction_or_expr (const exprt &expr)
3096
+ {
3097
+ PRECONDITION (expr.id () == ID_reduction_or);
3098
+ reduction_or_exprt::check (expr);
3099
+ return static_cast <const reduction_or_exprt &>(expr);
3100
+ }
3101
+
3102
+ inline reduction_or_exprt &to_reduction_or_expr (exprt &expr)
3103
+ {
3104
+ PRECONDITION (expr.id () == ID_reduction_or);
3105
+ reduction_or_exprt::check (expr);
3106
+ return static_cast <reduction_or_exprt &>(expr);
3107
+ }
3108
+
3109
+ class reduction_nor_exprt : public unary_predicate_exprt
3110
+ {
3111
+ public:
3112
+ explicit reduction_nor_exprt (exprt _op)
3113
+ : unary_predicate_exprt(ID_reduction_nor, std::move(_op))
3114
+ {
3115
+ }
3116
+ };
3117
+
3118
+ template <>
3119
+ inline bool can_cast_expr<reduction_nor_exprt>(const exprt &expr)
3120
+ {
3121
+ reduction_nor_exprt::check (expr);
3122
+ return expr.id () == ID_reduction_nor;
3123
+ }
3124
+
3125
+ inline const reduction_nor_exprt &to_reduction_nor_expr (const exprt &expr)
3126
+ {
3127
+ PRECONDITION (expr.id () == ID_reduction_nor);
3128
+ reduction_nor_exprt::check (expr);
3129
+ return static_cast <const reduction_nor_exprt &>(expr);
3130
+ }
3131
+
3132
+ inline reduction_nor_exprt &to_reduction_nor_expr (exprt &expr)
3133
+ {
3134
+ PRECONDITION (expr.id () == ID_reduction_nor);
3135
+ reduction_nor_exprt::check (expr);
3136
+ return static_cast <reduction_nor_exprt &>(expr);
3137
+ }
3138
+
3139
+ class reduction_nand_exprt : public unary_predicate_exprt
3140
+ {
3141
+ public:
3142
+ explicit reduction_nand_exprt (exprt _op)
3143
+ : unary_predicate_exprt(ID_reduction_nand, std::move(_op))
3144
+ {
3145
+ }
3146
+ };
3147
+
3148
+ template <>
3149
+ inline bool can_cast_expr<reduction_nand_exprt>(const exprt &expr)
3150
+ {
3151
+ reduction_nand_exprt::check (expr);
3152
+ return expr.id () == ID_reduction_nand;
3153
+ }
3154
+
3155
+ inline const reduction_nand_exprt &to_reduction_nand_expr (const exprt &expr)
3156
+ {
3157
+ PRECONDITION (expr.id () == ID_reduction_nand);
3158
+ reduction_nand_exprt::check (expr);
3159
+ return static_cast <const reduction_nand_exprt &>(expr);
3160
+ }
3161
+
3162
+ inline reduction_nand_exprt &to_reduction_nand_expr (exprt &expr)
3163
+ {
3164
+ PRECONDITION (expr.id () == ID_reduction_nand);
3165
+ reduction_nand_exprt::check (expr);
3166
+ return static_cast <reduction_nand_exprt &>(expr);
3167
+ }
3168
+
3169
+ class reduction_xor_exprt : public unary_predicate_exprt
3170
+ {
3171
+ public:
3172
+ explicit reduction_xor_exprt (exprt _op)
3173
+ : unary_predicate_exprt(ID_reduction_xor, std::move(_op))
3174
+ {
3175
+ }
3176
+ };
3177
+
3178
+ template <>
3179
+ inline bool can_cast_expr<reduction_xor_exprt>(const exprt &expr)
3180
+ {
3181
+ reduction_xor_exprt::check (expr);
3182
+ return expr.id () == ID_reduction_xor;
3183
+ }
3184
+
3185
+ inline const reduction_xor_exprt &to_reduction_xor_expr (const exprt &expr)
3186
+ {
3187
+ PRECONDITION (expr.id () == ID_reduction_xor);
3188
+ reduction_xor_exprt::check (expr);
3189
+ return static_cast <const reduction_xor_exprt &>(expr);
3190
+ }
3191
+
3192
+ inline reduction_xor_exprt &to_reduction_xor_expr (exprt &expr)
3193
+ {
3194
+ PRECONDITION (expr.id () == ID_reduction_xor);
3195
+ reduction_xor_exprt::check (expr);
3196
+ return static_cast <reduction_xor_exprt &>(expr);
3197
+ }
3198
+
3199
+ class reduction_xnor_exprt : public unary_predicate_exprt
3200
+ {
3201
+ public:
3202
+ explicit reduction_xnor_exprt (exprt _op)
3203
+ : unary_predicate_exprt(ID_reduction_xnor, std::move(_op))
3204
+ {
3205
+ }
3206
+ };
3207
+
3208
+ template <>
3209
+ inline bool can_cast_expr<reduction_xnor_exprt>(const exprt &expr)
3210
+ {
3211
+ reduction_xnor_exprt::check (expr);
3212
+ return expr.id () == ID_reduction_xnor;
3213
+ }
3214
+
3215
+ inline const reduction_xnor_exprt &to_reduction_xnor_expr (const exprt &expr)
3216
+ {
3217
+ PRECONDITION (expr.id () == ID_reduction_xnor);
3218
+ reduction_xnor_exprt::check (expr);
3219
+ return static_cast <const reduction_xnor_exprt &>(expr);
3220
+ }
3221
+
3222
+ inline reduction_xnor_exprt &to_reduction_xnor_expr (exprt &expr)
3223
+ {
3224
+ PRECONDITION (expr.id () == ID_reduction_xnor);
3225
+ reduction_xnor_exprt::check (expr);
3226
+ return static_cast <reduction_xnor_exprt &>(expr);
3227
+ }
3228
+
3049
3229
#endif
0 commit comments