@@ -24,13 +24,10 @@ Author: Peter Schrammel
24
24
#include < goto-programs/instrument_preconditions.h>
25
25
#include < goto-programs/loop_ids.h>
26
26
#include < goto-programs/mm_io.h>
27
- #include < goto-programs/remove_complex.h>
28
27
#include < goto-programs/remove_function_pointers.h>
29
28
#include < goto-programs/remove_returns.h>
30
29
#include < goto-programs/remove_skip.h>
31
- #include < goto-programs/remove_vector.h>
32
30
#include < goto-programs/remove_virtual_functions.h>
33
- #include < goto-programs/rewrite_union.h>
34
31
#include < goto-programs/set_properties.h>
35
32
#include < goto-programs/show_properties.h>
36
33
@@ -71,88 +68,9 @@ void jdiff_parse_optionst::get_command_line_options(optionst &options)
71
68
if (cmdline.isset (" cover" ))
72
69
parse_cover_options (cmdline, options);
73
70
74
- if (cmdline.isset (" mm" ))
75
- options.set_option (" mm" , cmdline.get_value (" mm" ));
76
-
77
71
// all checks supported by goto_check
78
72
PARSE_OPTIONS_GOTO_CHECK_JAVA (cmdline, options);
79
73
80
- if (cmdline.isset (" debug-level" ))
81
- options.set_option (" debug-level" , cmdline.get_value (" debug-level" ));
82
-
83
- if (cmdline.isset (" unwindset" ))
84
- options.set_option (" unwindset" , cmdline.get_value (" unwindset" ));
85
-
86
- // constant propagation
87
- if (cmdline.isset (" no-propagation" ))
88
- options.set_option (" propagation" , false );
89
- else
90
- options.set_option (" propagation" , true );
91
-
92
- // check array bounds
93
- if (cmdline.isset (" bounds-check" ))
94
- options.set_option (" bounds-check" , true );
95
- else
96
- options.set_option (" bounds-check" , false );
97
-
98
- // check division by zero
99
- if (cmdline.isset (" div-by-zero-check" ))
100
- options.set_option (" div-by-zero-check" , true );
101
- else
102
- options.set_option (" div-by-zero-check" , false );
103
-
104
- // check overflow/underflow
105
- if (cmdline.isset (" signed-overflow-check" ))
106
- options.set_option (" signed-overflow-check" , true );
107
- else
108
- options.set_option (" signed-overflow-check" , false );
109
-
110
- // check overflow/underflow
111
- if (cmdline.isset (" unsigned-overflow-check" ))
112
- options.set_option (" unsigned-overflow-check" , true );
113
- else
114
- options.set_option (" unsigned-overflow-check" , false );
115
-
116
- // check overflow/underflow
117
- if (cmdline.isset (" float-overflow-check" ))
118
- options.set_option (" float-overflow-check" , true );
119
- else
120
- options.set_option (" float-overflow-check" , false );
121
-
122
- // check for NaN (not a number)
123
- if (cmdline.isset (" nan-check" ))
124
- options.set_option (" nan-check" , true );
125
- else
126
- options.set_option (" nan-check" , false );
127
-
128
- // check pointers
129
- if (cmdline.isset (" pointer-check" ))
130
- options.set_option (" pointer-check" , true );
131
- else
132
- options.set_option (" pointer-check" , false );
133
-
134
- // check for memory leaks
135
- if (cmdline.isset (" memory-leak-check" ))
136
- options.set_option (" memory-leak-check" , true );
137
- else
138
- options.set_option (" memory-leak-check" , false );
139
-
140
- // check assertions
141
- if (cmdline.isset (" no-assertions" ))
142
- options.set_option (" assertions" , false );
143
- else
144
- options.set_option (" assertions" , true );
145
-
146
- // use assumptions
147
- if (cmdline.isset (" no-assumptions" ))
148
- options.set_option (" assumptions" , false );
149
- else
150
- options.set_option (" assumptions" , true );
151
-
152
- // magic error label
153
- if (cmdline.isset (" error-label" ))
154
- options.set_option (" error-label" , cmdline.get_values (" error-label" ));
155
-
156
74
options.set_option (" show-properties" , cmdline.isset (" show-properties" ));
157
75
}
158
76
@@ -270,11 +188,8 @@ bool jdiff_parse_optionst::process_goto_program(
270
188
// instrument library preconditions
271
189
instrument_preconditions (goto_model);
272
190
273
- // remove returns, gcc vectors, complex
191
+ // remove returns
274
192
remove_returns (goto_model);
275
- remove_vector (goto_model);
276
- remove_complex (goto_model);
277
- rewrite_union (goto_model);
278
193
279
194
// add generic checks
280
195
log .status () << " Generic Property Instrumentation" << messaget::eom;
@@ -286,16 +201,13 @@ bool jdiff_parse_optionst::process_goto_program(
286
201
// recalculate numbers, etc.
287
202
goto_model.goto_functions .update ();
288
203
289
- // add loop ids
290
- goto_model.goto_functions .compute_loop_numbers ();
291
-
292
- // remove skips such that trivial GOTOs are deleted and not considered
293
- // for coverage annotation:
294
- remove_skip (goto_model);
295
-
296
204
// instrument cover goals
297
205
if (cmdline.isset (" cover" ))
298
206
{
207
+ // remove skips such that trivial GOTOs are deleted and not considered for
208
+ // coverage annotation:
209
+ remove_skip (goto_model);
210
+
299
211
const auto cover_config =
300
212
get_cover_config (options, goto_model.symbol_table , ui_message_handler);
301
213
if (instrument_cover_goals (cover_config, goto_model, ui_message_handler))
@@ -311,7 +223,6 @@ bool jdiff_parse_optionst::process_goto_program(
311
223
312
224
// remove any skips introduced since coverage instrumentation
313
225
remove_skip (goto_model);
314
- goto_model.goto_functions .update ();
315
226
}
316
227
317
228
return false ;
@@ -335,7 +246,7 @@ void jdiff_parse_optionst::help()
335
246
" Diff options:\n "
336
247
HELP_SHOW_GOTO_FUNCTIONS
337
248
HELP_SHOW_PROPERTIES
338
- " --syntactic do syntactic diff (default) \n "
249
+ " --show-loops show the loops in the programs \n "
339
250
" -u | --unified output unified diff\n "
340
251
" --change-impact | \n "
341
252
" --forward-impact |\n "
0 commit comments