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)
12201220
12211221 convert_expr (expr.operands ().front ());
12221222 }
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)
12291226 {
12301227 DATA_INVARIANT_WITH_DIAGNOSTICS (
12311228 expr.operands ().size () >= 2 ,
@@ -1255,6 +1252,28 @@ void smt2_convt::convert_expr(const exprt &expr)
12551252
12561253 out << " )" ;
12571254 }
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+ }
12581277 else if (expr.id ()==ID_bitnot)
12591278 {
12601279 const bitnot_exprt &bitnot_expr = to_bitnot_expr (expr);
You can’t perform that action at this time.
0 commit comments