@@ -92,9 +92,6 @@ ::cbmc_parse_optionst::cbmc_parse_optionst(
92
92
93
93
void cbmc_parse_optionst::set_default_options (optionst &options)
94
94
{
95
- // Enable the standard checks by default, unless a user overrides.
96
- options.set_option (" standard-checks" , true );
97
-
98
95
// Default true
99
96
options.set_option (" built-in-assertions" , true );
100
97
options.set_option (" propagation" , true );
@@ -137,13 +134,16 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
137
134
}
138
135
139
136
cbmc_parse_optionst::set_default_options (options);
140
- cbmc_parse_optionst::set_default_analysis_flags (options);
141
137
parse_c_object_factory_options (cmdline, options);
142
138
143
139
if (cmdline.isset (" function" ))
144
140
options.set_option (" function" , cmdline.get_value (" function" ));
145
141
146
- if (cmdline.isset (" cover" ) && cmdline.isset (" unwinding-assertions" ))
142
+ if (
143
+ cmdline.isset (" cover" ) &&
144
+ // The option is set by default, or passed in the by the user.
145
+ (options.is_set (" unwinding-assertions" ) ||
146
+ cmdline.isset (" unwinding-assertions" )))
147
147
{
148
148
log.error ()
149
149
<< " --cover and --unwinding-assertions must not be given together"
@@ -284,7 +284,9 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
284
284
if (cmdline.isset (" unwind" ))
285
285
{
286
286
options.set_option (" unwind" , cmdline.get_value (" unwind" ));
287
- if (!cmdline.isset (" unwinding-assertions" ))
287
+ if (
288
+ !options.is_set (" unwinding-assertions" ) &&
289
+ !cmdline.isset (" unwinding-assertions" ))
288
290
{
289
291
log.warning () << " **** WARNING: Use --unwinding-assertions to obtain "
290
292
" sound verification results"
@@ -311,7 +313,9 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
311
313
{
312
314
options.set_option (
313
315
" unwindset" , cmdline.get_comma_separated_values (" unwindset" ));
314
- if (!cmdline.isset (" unwinding-assertions" ))
316
+ if (
317
+ !options.is_set (" unwinding-assertions" ) &&
318
+ !cmdline.isset (" unwinding-assertions" ))
315
319
{
316
320
log.warning () << " **** WARNING: Use --unwinding-assertions to obtain "
317
321
" sound verification results"
@@ -330,11 +334,9 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
330
334
331
335
// Enable flags that in combination provide analysis with no surprises
332
336
// (expected checks and no unsoundness by missing checks).
333
- if (
334
- !cmdline.isset (" no-standard-checks" ) &&
335
- options.get_bool_option (" standard-checks" ))
337
+ if (!cmdline.isset (" no-standard-checks" ))
336
338
{
337
- set_default_analysis_flags (options);
339
+ cbmc_parse_optionst:: set_default_analysis_flags (options);
338
340
PARSE_OPTIONS_GOTO_CHECK_NEGATIVE_DEFAULT_CHECKS (cmdline, options);
339
341
}
340
342
else if (cmdline.isset (" no-standard-checks" ))
@@ -346,7 +348,9 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
346
348
PARSE_OPTIONS_GOTO_CHECK (cmdline, options);
347
349
348
350
// generate unwinding assertions
349
- if (cmdline.isset (" unwinding-assertions" ))
351
+ if (
352
+ options.is_set (" unwinding-assertions" ) ||
353
+ cmdline.isset (" unwinding-assertions" ))
350
354
{
351
355
options.set_option (" unwinding-assertions" , true );
352
356
options.set_option (" paths-symex-explore-all" , true );
0 commit comments