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