@@ -92,9 +92,6 @@ ::cbmc_parse_optionst::cbmc_parse_optionst(
9292
9393void cbmc_parse_optionst::set_default_options (optionst &options)
9494{
95- // Enable the standard checks by default, unless a user overrides.
96- options.set_option (" standard-checks" , true );
97-
9895 // Default true
9996 options.set_option (" built-in-assertions" , true );
10097 options.set_option (" propagation" , true );
@@ -137,13 +134,16 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
137134 }
138135
139136 cbmc_parse_optionst::set_default_options (options);
140- cbmc_parse_optionst::set_default_analysis_flags (options);
141137 parse_c_object_factory_options (cmdline, options);
142138
143139 if (cmdline.isset (" function" ))
144140 options.set_option (" function" , cmdline.get_value (" function" ));
145141
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" )))
147147 {
148148 log.error ()
149149 << " --cover and --unwinding-assertions must not be given together"
@@ -284,7 +284,9 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
284284 if (cmdline.isset (" unwind" ))
285285 {
286286 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" ))
288290 {
289291 log.warning () << " **** WARNING: Use --unwinding-assertions to obtain "
290292 " sound verification results"
@@ -311,7 +313,9 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
311313 {
312314 options.set_option (
313315 " 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" ))
315319 {
316320 log.warning () << " **** WARNING: Use --unwinding-assertions to obtain "
317321 " sound verification results"
@@ -330,11 +334,9 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
330334
331335 // Enable flags that in combination provide analysis with no surprises
332336 // (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" ))
336338 {
337- set_default_analysis_flags (options);
339+ cbmc_parse_optionst:: set_default_analysis_flags (options);
338340 PARSE_OPTIONS_GOTO_CHECK_NEGATIVE_DEFAULT_CHECKS (cmdline, options);
339341 }
340342 else if (cmdline.isset (" no-standard-checks" ))
@@ -346,7 +348,9 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
346348 PARSE_OPTIONS_GOTO_CHECK (cmdline, options);
347349
348350 // generate unwinding assertions
349- if (cmdline.isset (" unwinding-assertions" ))
351+ if (
352+ options.is_set (" unwinding-assertions" ) ||
353+ cmdline.isset (" unwinding-assertions" ))
350354 {
351355 options.set_option (" unwinding-assertions" , true );
352356 options.set_option (" paths-symex-explore-all" , true );
0 commit comments