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)
14071407 out << " (ite " ;
14081408 convert_expr (if_expr.cond ());
14091409 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+ }
14111424 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+ }
14131439 out << " )" ;
14141440 }
14151441 else if (expr.id ()==ID_and ||
You can’t perform that action at this time.
0 commit comments