File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -1407,9 +1407,35 @@ void smt2_convt::convert_expr(const exprt &expr)
1407
1407
out << " (ite " ;
1408
1408
convert_expr (if_expr.cond ());
1409
1409
out << " " ;
1410
- convert_expr (if_expr.true_case ());
1410
+ if (
1411
+ expr.type ().id () == ID_array && !use_array_theory (if_expr.true_case ()) &&
1412
+ use_array_theory (if_expr.false_case ()))
1413
+ {
1414
+ unflatten (wheret::BEGIN, expr.type ());
1415
+
1416
+ convert_expr (if_expr.true_case ());
1417
+
1418
+ unflatten (wheret::END, expr.type ());
1419
+ }
1420
+ else
1421
+ {
1422
+ convert_expr (if_expr.true_case ());
1423
+ }
1411
1424
out << " " ;
1412
- convert_expr (if_expr.false_case ());
1425
+ if (
1426
+ expr.type ().id () == ID_array && use_array_theory (if_expr.true_case ()) &&
1427
+ !use_array_theory (if_expr.false_case ()))
1428
+ {
1429
+ unflatten (wheret::BEGIN, expr.type ());
1430
+
1431
+ convert_expr (if_expr.false_case ());
1432
+
1433
+ unflatten (wheret::END, expr.type ());
1434
+ }
1435
+ else
1436
+ {
1437
+ convert_expr (if_expr.false_case ());
1438
+ }
1413
1439
out << " )" ;
1414
1440
}
1415
1441
else if (expr.id ()==ID_and ||
You can’t perform that action at this time.
0 commit comments