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