File tree Expand file tree Collapse file tree 1 file changed +25
-6
lines changed Expand file tree Collapse file tree 1 file changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -1220,12 +1220,9 @@ void smt2_convt::convert_expr(const exprt &expr)
1220
1220
1221
1221
convert_expr (expr.operands ().front ());
1222
1222
}
1223
- else if (expr.id ()==ID_concatenation ||
1224
- expr.id ()==ID_bitand ||
1225
- expr.id ()==ID_bitor ||
1226
- expr.id ()==ID_bitxor ||
1227
- expr.id ()==ID_bitnand ||
1228
- expr.id ()==ID_bitnor)
1223
+ else if (
1224
+ expr.id () == ID_concatenation || expr.id () == ID_bitand ||
1225
+ expr.id () == ID_bitor || expr.id () == ID_bitxor)
1229
1226
{
1230
1227
DATA_INVARIANT_WITH_DIAGNOSTICS (
1231
1228
expr.operands ().size () >= 2 ,
@@ -1255,6 +1252,28 @@ void smt2_convt::convert_expr(const exprt &expr)
1255
1252
1256
1253
out << " )" ;
1257
1254
}
1255
+ else if (
1256
+ expr.id () == ID_bitxnor || expr.id () == ID_bitnand ||
1257
+ expr.id () == ID_bitnor)
1258
+ {
1259
+ // only exist as a binary expression
1260
+ const auto &bitxnor = to_bitxnor_expr (expr);
1261
+ DATA_INVARIANT (
1262
+ expr.operands ().size () == 2 , " bitxnor should have two operands" );
1263
+
1264
+ out << ' (' ;
1265
+ if (expr.id () == ID_bitxnor)
1266
+ out << " bvxnor" ;
1267
+ else if (expr.id () == ID_bitnand)
1268
+ out << " bvnand" ;
1269
+ else if (expr.id () == ID_bitnor)
1270
+ out << " bvnor" ;
1271
+ out << ' ' ;
1272
+ flatten2bv (bitxnor.op0 ());
1273
+ out << ' ' ;
1274
+ flatten2bv (bitxnor.op1 ());
1275
+ out << ' )' ;
1276
+ }
1258
1277
else if (expr.id ()==ID_bitnot)
1259
1278
{
1260
1279
const bitnot_exprt &bitnot_expr = to_bitnot_expr (expr);
You can’t perform that action at this time.
0 commit comments