@@ -989,34 +989,35 @@ static exprt get_char_array_and_concretize(
989
989
if (arr_model_opt)
990
990
{
991
991
stream << indent << indent << " - char_array: " << format (*arr_model_opt)
992
+ << ' \n ' ;
993
+ stream << indent << indent << " - type : " << format (arr_model_opt->type ())
992
994
<< eom;
993
995
const exprt simple = simplify_expr (*arr_model_opt, ns);
994
996
stream << indent << indent << " - simplified_char_array: " << format (simple)
995
997
<< eom;
996
- const exprt concretized_array =
997
- concretize_arrays_in_expression (simple, max_string_length, ns);
998
- stream << indent << indent
999
- << " - concretized_char_array: " << format (concretized_array) << eom;
1000
-
1001
- if (concretized_array.id () == ID_array)
1002
- {
1003
- stream << indent << indent << " - as_string: \" "
1004
- << string_of_array (to_array_expr (concretized_array)) << " \"\n " ;
1005
- }
1006
- else
998
+ if (
999
+ const auto concretized_array = get_array (
1000
+ super_get, ns, max_string_length, stream, to_array_string_expr (simple)))
1007
1001
{
1008
- stream << indent << " - warning: not an array" << eom;
1009
- }
1002
+ stream << indent << indent
1003
+ << " - concretized_char_array: " << format (*concretized_array)
1004
+ << eom;
1010
1005
1011
- stream << indent << indent << " - type: " << format (concretized_array.type ())
1012
- << eom;
1013
- return concretized_array;
1014
- }
1015
- else
1016
- {
1017
- stream << indent << indent << " - incomplete model" << eom;
1018
- return arr;
1006
+ if (
1007
+ const auto array_expr =
1008
+ expr_try_dynamic_cast<array_exprt>(*concretized_array))
1009
+ {
1010
+ stream << indent << indent << " - as_string: \" "
1011
+ << string_of_array (*array_expr) << " \"\n " ;
1012
+ }
1013
+ else
1014
+ stream << indent << " - warning: not an array" << eom;
1015
+ return *concretized_array;
1016
+ }
1017
+ return simple;
1019
1018
}
1019
+ stream << indent << indent << " - incomplete model" << eom;
1020
+ return arr;
1020
1021
}
1021
1022
1022
1023
// / Display part of the current model by mapping the variables created by the
0 commit comments