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 @@ -303,3 +303,36 @@ void recursive_initializationt::initialize_dynamic_array(
303
303
304
304
body.add (code_assignt{pointer, index_exprt{arrays, nondet_index}});
305
305
}
306
+
307
+ std::string recursive_initialization_configt::to_string () const
308
+ {
309
+ std::ostringstream out{};
310
+ out << " recursive_initialization_config {"
311
+ << " \n min_null_tree_depth = " << min_null_tree_depth
312
+ << " \n max_nondet_tree_depth = " << max_nondet_tree_depth
313
+ << " \n mode = " << mode
314
+ << " \n max_dynamic_array_size = " << max_dynamic_array_size
315
+ << " \n min_dynamic_array_size = " << min_dynamic_array_size
316
+ << " \n pointers_to_treat_as_arrays = [" ;
317
+ for (auto const &pointer : pointers_to_treat_as_arrays)
318
+ {
319
+ out << " \n " << pointer;
320
+ }
321
+ out << " \n ]"
322
+ << " \n variables_that_hold_array_sizes = [" ;
323
+ for (auto const &array_size : variables_that_hold_array_sizes)
324
+ {
325
+ out << " \n " << array_size;
326
+ }
327
+ out << " \n ]" ;
328
+ out << " \n array_name_to_associated_size_variable = [" ;
329
+ for (auto const &associated_array_size :
330
+ array_name_to_associated_array_size_variable)
331
+ {
332
+ out << " \n " << associated_array_size.first << " -> "
333
+ << associated_array_size.second ;
334
+ }
335
+ out << " \n ]" ;
336
+ out << " \n }" ;
337
+ return out.str ();
338
+ }
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