File tree 2 files changed +35
-0
lines changed
2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -302,3 +302,36 @@ void recursive_initializationt::initialize_dynamic_array(
302
302
303
303
body.add (code_assignt{pointer, index_exprt{arrays, nondet_index}});
304
304
}
305
+
306
+ std::string recursive_initialization_configt::to_string () const
307
+ {
308
+ std::ostringstream out{};
309
+ out << " recursive_initialization_config {"
310
+ << " \n min_null_tree_depth = " << min_null_tree_depth
311
+ << " \n max_nondet_tree_depth = " << max_nondet_tree_depth
312
+ << " \n mode = " << mode
313
+ << " \n max_dynamic_array_size = " << max_dynamic_array_size
314
+ << " \n min_dynamic_array_size = " << min_dynamic_array_size
315
+ << " \n pointers_to_treat_as_arrays = [" ;
316
+ for (auto const &pointer : pointers_to_treat_as_arrays)
317
+ {
318
+ out << " \n " << pointer;
319
+ }
320
+ out << " \n ]"
321
+ << " \n variables_that_hold_array_sizes = [" ;
322
+ for (auto const &array_size : variables_that_hold_array_sizes)
323
+ {
324
+ out << " \n " << array_size;
325
+ }
326
+ out << " \n ]" ;
327
+ out << " \n array_name_to_associated_size_variable = [" ;
328
+ for (auto const &associated_array_size :
329
+ array_name_to_associated_array_size_variable)
330
+ {
331
+ out << " \n " << associated_array_size.first << " -> "
332
+ << associated_array_size.second ;
333
+ }
334
+ out << " \n ]" ;
335
+ out << " \n }" ;
336
+ return out.str ();
337
+ }
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ struct recursive_initialization_configt
31
31
std::set<irep_idt> pointers_to_treat_as_arrays;
32
32
std::set<irep_idt> variables_that_hold_array_sizes;
33
33
std::map<irep_idt, irep_idt> array_name_to_associated_array_size_variable;
34
+
35
+ std::string to_string () const ; // for debugging purposes
34
36
};
35
37
36
38
// / Class for generating initialisation code
You can’t perform that action at this time.
0 commit comments