@@ -461,6 +461,50 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
461
461
462
462
/* ******************************************************************\
463
463
464
+ Function: cbmc_parse_optionst::options_exclusive
465
+
466
+ Inputs:
467
+
468
+ Outputs:
469
+
470
+ Purpose: check conflicts between options: not allowed together
471
+
472
+ \*******************************************************************/
473
+
474
+ bool cbmc_parse_optionst::options_exclusive (const char *opt1, const char *opt2)
475
+ {
476
+ if (cmdline.isset (opt1) && cmdline.isset (opt2))
477
+ {
478
+ error () << " --" << opt1 << " cannot be used with --" << opt2 << eom;
479
+ return true ;
480
+ }
481
+ return false ;
482
+ }
483
+
484
+ /* ******************************************************************\
485
+
486
+ Function: cbmc_parse_optionst::options_inclusive
487
+
488
+ Inputs:
489
+
490
+ Outputs:
491
+
492
+ Purpose: check conflicts between options: opt1 only if opt2
493
+
494
+ \*******************************************************************/
495
+
496
+ bool cbmc_parse_optionst::options_inclusive (const char *opt1, const char *opt2)
497
+ {
498
+ if (cmdline.isset (opt1) && !cmdline.isset (opt2))
499
+ {
500
+ error () << " --" << opt1 << " can only be used with --" << opt2 << eom;
501
+ return true ;
502
+ }
503
+ return false ;
504
+ }
505
+
506
+ /* ******************************************************************\
507
+
464
508
Function: cbmc_parse_optionst::doit
465
509
466
510
Inputs:
@@ -507,6 +551,13 @@ int cbmc_parse_optionst::doit()
507
551
return 1 ; // should contemplate EX_USAGE from sysexits.h
508
552
}
509
553
554
+ if (options_exclusive (" incremental" , " unwind" ) ||
555
+ options_exclusive (" incremental" , " incremental-check" ) ||
556
+ options_inclusive (" earliest-loop-exit" , " incremental" ))
557
+ {
558
+ return 1 ;
559
+ }
560
+
510
561
register_languages ();
511
562
512
563
if (cmdline.isset (" test-preprocessor" ))
0 commit comments