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 @@ -290,3 +290,36 @@ void recursive_initializationt::initialize_dynamic_array(
290
290
291
291
body.add (code_assignt{pointer, index_exprt{arrays, nondet_index}});
292
292
}
293
+
294
+ std::string recursive_initialization_configt::to_string () const
295
+ {
296
+ std::ostringstream out{};
297
+ out << " recursive_initialization_config {"
298
+ << " \n min_null_tree_depth = " << min_null_tree_depth
299
+ << " \n max_nondet_tree_depth = " << max_nondet_tree_depth
300
+ << " \n mode = " << mode
301
+ << " \n max_dynamic_array_size = " << max_dynamic_array_size
302
+ << " \n min_dynamic_array_size = " << min_dynamic_array_size
303
+ << " \n pointers_to_treat_as_arrays = [" ;
304
+ for (auto const &pointer : pointers_to_treat_as_arrays)
305
+ {
306
+ out << " \n " << pointer;
307
+ }
308
+ out << " \n ]"
309
+ << " \n variables_that_hold_array_sizes = [" ;
310
+ for (auto const &array_size : variables_that_hold_array_sizes)
311
+ {
312
+ out << " \n " << array_size;
313
+ }
314
+ out << " \n ]" ;
315
+ out << " \n array_name_to_associated_size_variable = [" ;
316
+ for (auto const &associated_array_size :
317
+ array_name_to_associated_array_size_variable)
318
+ {
319
+ out << " \n " << associated_array_size.first << " -> "
320
+ << associated_array_size.second ;
321
+ }
322
+ out << " \n ]" ;
323
+ out << " \n }" ;
324
+ return out.str ();
325
+ }
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