29
29
#include " show.h"
30
30
31
31
void show_assignments (
32
+ const irep_idt &function_identifier,
32
33
const goto_functionst::goto_functiont &goto_function,
33
34
const namespacet &ns,
34
35
const optionst &options,
35
36
std::ostream &out)
36
37
{
37
38
ssa_objectst ssa_objects (goto_function, ns);
38
- ssa_value_ait ssa_value_ai (goto_function, ns, options);
39
+ ssa_value_ait ssa_value_ai (function_identifier, goto_function, ns, options);
39
40
assignmentst assignments (
40
41
goto_function.body ,
41
42
ns,
@@ -61,37 +62,38 @@ void show_assignments(
61
62
if (f_it==goto_model.goto_functions .function_map .end ())
62
63
out << " function " << function << " not found\n " ;
63
64
else
64
- show_assignments (f_it->second , ns, options, out);
65
+ show_assignments (f_it->first , f_it-> second , ns, options, out);
65
66
}
66
67
else
67
68
{
68
69
forall_goto_functions (f_it, goto_model.goto_functions )
69
70
{
70
71
out << " >>>> Function " << f_it->first << " \n " ;
71
72
72
- show_assignments (f_it->second , ns, options, out);
73
+ show_assignments (f_it->first , f_it-> second , ns, options, out);
73
74
74
75
out << " \n " ;
75
76
}
76
77
}
77
78
}
78
79
79
80
void show_defs (
81
+ const irep_idt &function_identifier,
80
82
const goto_functionst::goto_functiont &goto_function,
81
83
const namespacet &ns,
82
84
const optionst &options,
83
85
std::ostream &out)
84
86
{
85
87
ssa_objectst ssa_objects (goto_function, ns);
86
- ssa_value_ait ssa_value_ai (goto_function, ns, options);
88
+ ssa_value_ait ssa_value_ai (function_identifier, goto_function, ns, options);
87
89
assignmentst assignments (
88
90
goto_function.body ,
89
91
ns,
90
92
options,
91
93
ssa_objects,
92
94
ssa_value_ai);
93
95
ssa_ait ssa_analysis (assignments);
94
- ssa_analysis (goto_function, ns);
96
+ ssa_analysis (function_identifier, goto_function, ns);
95
97
ssa_analysis.output (ns, goto_function.body , out);
96
98
}
97
99
@@ -111,15 +113,15 @@ void show_defs(
111
113
if (f_it==goto_model.goto_functions .function_map .end ())
112
114
out << " function " << function << " not found\n " ;
113
115
else
114
- show_defs (f_it->second , ns, options, out);
116
+ show_defs (f_it->first , f_it-> second , ns, options, out);
115
117
}
116
118
else
117
119
{
118
120
forall_goto_functions (f_it, goto_model.goto_functions )
119
121
{
120
122
out << " >>>> Function " << f_it->first << " \n " ;
121
123
122
- show_defs (f_it->second , ns, options, out);
124
+ show_defs (f_it->first , f_it-> second , ns, options, out);
123
125
124
126
out << " \n " ;
125
127
}
@@ -166,6 +168,7 @@ void show_guards(
166
168
}
167
169
168
170
void show_ssa (
171
+ const irep_idt &function_identifier,
169
172
const goto_functionst::goto_functiont &goto_function,
170
173
bool simplify,
171
174
const symbol_tablet &symbol_table,
@@ -175,7 +178,11 @@ void show_ssa(
175
178
if (!goto_function.body_available ())
176
179
return ;
177
180
178
- unwindable_local_SSAt local_SSA (goto_function, symbol_table, options);
181
+ unwindable_local_SSAt local_SSA (
182
+ function_identifier,
183
+ goto_function,
184
+ symbol_table,
185
+ options);
179
186
if (simplify)
180
187
::simplify (local_SSA, local_SSA.ns);
181
188
local_SSA.output_verbose (out);
@@ -197,7 +204,13 @@ void show_ssa(
197
204
if (f_it==goto_model.goto_functions .function_map .end ())
198
205
out << " function " << function << " not found\n " ;
199
206
else
200
- show_ssa (f_it->second , simplify, goto_model.symbol_table , options, out);
207
+ show_ssa (
208
+ f_it->first ,
209
+ f_it->second ,
210
+ simplify,
211
+ goto_model.symbol_table ,
212
+ options,
213
+ out);
201
214
}
202
215
else
203
216
{
@@ -210,7 +223,13 @@ void show_ssa(
210
223
211
224
out << " >>>> Function " << f_it->first << " \n " ;
212
225
213
- show_ssa (f_it->second , simplify, goto_model.symbol_table , options, out);
226
+ show_ssa (
227
+ f_it->first ,
228
+ f_it->second ,
229
+ simplify,
230
+ goto_model.symbol_table ,
231
+ options,
232
+ out);
214
233
215
234
out << " \n " ;
216
235
}
@@ -383,13 +402,14 @@ void show_ssa_symbols(
383
402
}
384
403
385
404
void show_value_set (
405
+ const irep_idt &function_identifier,
386
406
const goto_functionst::goto_functiont &goto_function,
387
407
const namespacet &ns,
388
408
const optionst &options,
389
409
std::ostream &out)
390
410
{
391
411
ssa_objectst ssa_objects (goto_function, ns);
392
- ssa_value_ait ssa_value_ai (goto_function, ns, options);
412
+ ssa_value_ait ssa_value_ai (function_identifier, goto_function, ns, options);
393
413
ssa_value_ai.output (ns, goto_function, out);
394
414
}
395
415
@@ -409,15 +429,15 @@ void show_value_sets(
409
429
if (f_it==goto_model.goto_functions .function_map .end ())
410
430
out << " function " << function << " not found\n " ;
411
431
else
412
- show_value_set (f_it->second , ns, options, out);
432
+ show_value_set (f_it->first , f_it-> second , ns, options, out);
413
433
}
414
434
else
415
435
{
416
436
forall_goto_functions (f_it, goto_model.goto_functions )
417
437
{
418
438
out << " >>>> Function " << f_it->first << " \n " ;
419
439
420
- show_value_set (f_it->second , ns, options, out);
440
+ show_value_set (f_it->first , f_it-> second , ns, options, out);
421
441
422
442
out << " \n " ;
423
443
}
0 commit comments