@@ -106,7 +106,6 @@ void cbmc_parse_optionst::set_default_options(optionst &options)
106
106
options.set_option (" built-in-assertions" , true );
107
107
options.set_option (" pretty-names" , true );
108
108
options.set_option (" propagation" , true );
109
- options.set_option (" sat-preprocessor" , true );
110
109
options.set_option (" simple-slice" , true );
111
110
options.set_option (" simplify" , true );
112
111
options.set_option (" simplify-if" , true );
@@ -306,42 +305,15 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
306
305
else if (cmdline.isset (" arrays-uf-never" ))
307
306
options.set_option (" arrays-uf" , " never" );
308
307
309
- if (cmdline.isset (" dimacs" ))
310
- options.set_option (" dimacs" , true );
311
-
312
308
if (cmdline.isset (" show-array-constraints" ))
313
309
options.set_option (" show-array-constraints" , true );
314
310
315
- if (cmdline.isset (" refine-arrays" ))
316
- {
317
- options.set_option (" refine" , true );
318
- options.set_option (" refine-arrays" , true );
319
- }
320
-
321
- if (cmdline.isset (" refine-arithmetic" ))
322
- {
323
- options.set_option (" refine" , true );
324
- options.set_option (" refine-arithmetic" , true );
325
- }
326
-
327
- if (cmdline.isset (" refine" ))
328
- {
329
- options.set_option (" refine" , true );
330
- options.set_option (" refine-arrays" , true );
331
- options.set_option (" refine-arithmetic" , true );
332
- }
333
-
334
311
if (cmdline.isset (" refine-strings" ))
335
312
{
336
313
options.set_option (" refine-strings" , true );
337
314
options.set_option (" string-printable" , cmdline.isset (" string-printable" ));
338
315
}
339
316
340
- if (cmdline.isset (" max-node-refinement" ))
341
- options.set_option (
342
- " max-node-refinement" ,
343
- cmdline.get_value (" max-node-refinement" ));
344
-
345
317
options.set_option (
346
318
" symex-cache-dereferences" , cmdline.isset (" symex-cache-dereferences" ));
347
319
@@ -369,104 +341,9 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
369
341
}
370
342
}
371
343
372
- // SMT Options
373
-
374
- if (cmdline.isset (" smt1" ))
375
- {
376
- log .error () << " --smt1 is no longer supported" << messaget::eom;
377
- exit (CPROVER_EXIT_USAGE_ERROR);
378
- }
379
-
380
- if (cmdline.isset (" smt2" ))
381
- options.set_option (" smt2" , true );
382
-
383
- if (cmdline.isset (" fpa" ))
384
- options.set_option (" fpa" , true );
385
-
386
- bool solver_set=false ;
387
-
388
- if (cmdline.isset (" boolector" ))
389
- {
390
- options.set_option (" boolector" , true ), solver_set=true ;
391
- options.set_option (" smt2" , true );
392
- }
393
-
394
- if (cmdline.isset (" cprover-smt2" ))
395
- {
396
- options.set_option (" cprover-smt2" , true ), solver_set = true ;
397
- options.set_option (" smt2" , true );
398
- }
399
-
400
- if (cmdline.isset (" mathsat" ))
401
- {
402
- options.set_option (" mathsat" , true ), solver_set=true ;
403
- options.set_option (" smt2" , true );
404
- }
405
-
406
- if (cmdline.isset (" cvc4" ))
407
- {
408
- options.set_option (" cvc4" , true ), solver_set=true ;
409
- options.set_option (" smt2" , true );
410
- }
411
-
412
- if (cmdline.isset (" incremental-smt2-solver" ))
413
- {
414
- options.set_option (
415
- " incremental-smt2-solver" , cmdline.get_value (" incremental-smt2-solver" )),
416
- solver_set = true ;
417
- }
418
-
419
- if (cmdline.isset (" external-sat-solver" ))
420
- {
421
- options.set_option (
422
- " external-sat-solver" , cmdline.get_value (" external-sat-solver" )),
423
- solver_set = true ;
424
- }
425
-
426
- if (cmdline.isset (" yices" ))
427
- {
428
- options.set_option (" yices" , true ), solver_set=true ;
429
- options.set_option (" smt2" , true );
430
- }
431
-
432
- if (cmdline.isset (" z3" ))
433
- {
434
- options.set_option (" z3" , true ), solver_set=true ;
435
- options.set_option (" smt2" , true );
436
- }
437
-
438
- if (cmdline.isset (" smt2" ) && !solver_set)
439
- {
440
- if (cmdline.isset (" outfile" ))
441
- {
442
- // outfile and no solver should give standard compliant SMT-LIB
443
- options.set_option (" generic" , true );
444
- }
445
- else
446
- {
447
- // the default smt2 solver
448
- options.set_option (" z3" , true );
449
- }
450
- }
451
-
452
- if (cmdline.isset (" write-solver-stats-to" ))
453
- {
454
- options.set_option (
455
- " write-solver-stats-to" , cmdline.get_value (" write-solver-stats-to" ));
456
- }
457
-
458
- if (cmdline.isset (" beautify" ))
459
- options.set_option (" beautify" , true );
460
-
461
- if (cmdline.isset (" no-sat-preprocessor" ))
462
- options.set_option (" sat-preprocessor" , false );
463
-
464
344
if (cmdline.isset (" no-pretty-names" ))
465
345
options.set_option (" pretty-names" , false );
466
346
467
- if (cmdline.isset (" outfile" ))
468
- options.set_option (" outfile" , cmdline.get_value (" outfile" ));
469
-
470
347
if (cmdline.isset (" graphml-witness" ))
471
348
{
472
349
options.set_option (" graphml-witness" , cmdline.get_value (" graphml-witness" ));
@@ -502,6 +379,14 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
502
379
503
380
// Options for process_goto_program
504
381
options.set_option (" rewrite-union" , true );
382
+
383
+ if (cmdline.isset (" smt1" ))
384
+ {
385
+ log .error () << " --smt1 is no longer supported" << messaget::eom;
386
+ exit (CPROVER_EXIT_USAGE_ERROR);
387
+ }
388
+
389
+ parse_solver_options (cmdline, options);
505
390
}
506
391
507
392
// / invoke main modules
@@ -1009,6 +894,7 @@ void cbmc_parse_optionst::help()
1009
894
" --trace give a counterexample trace for failed properties\n " // NOLINT(*)
1010
895
" --stop-on-fail stop analysis once a failed property is detected\n " // NOLINT(*)
1011
896
" (implies --trace)\n "
897
+ " --localize-faults localize faults (experimental)\n "
1012
898
" \n "
1013
899
" C/C++ frontend options:\n "
1014
900
" --preprocess stop after preprocessing\n "
@@ -1046,23 +932,8 @@ void cbmc_parse_optionst::help()
1046
932
" \n "
1047
933
" Backend options:\n "
1048
934
HELP_CONFIG_BACKEND
1049
- " --dimacs generate CNF in DIMACS format\n "
1050
- " --beautify beautify the counterexample (greedy heuristic)\n " // NOLINT(*)
1051
- " --localize-faults localize faults (experimental)\n "
1052
- " --smt2 use default SMT2 solver (Z3)\n "
1053
- " --boolector use Boolector\n "
1054
- " --cprover-smt2 use CPROVER SMT2 solver\n "
1055
- " --cvc4 use CVC4\n "
1056
- " --mathsat use MathSAT\n "
1057
- " --yices use Yices\n "
1058
- " --z3 use Z3\n "
1059
- " --refine use refinement procedure (experimental)\n "
1060
- " --incremental-smt2-solver cmd\n "
1061
- " command to invoke external SMT solver for\n "
1062
- " incremental solving (experimental)\n "
1063
- " --external-sat-solver cmd command to invoke SAT solver process\n "
935
+ HELP_SOLVER
1064
936
HELP_STRING_REFINEMENT_CBMC
1065
- " --outfile filename output formula to given file\n "
1066
937
" --arrays-uf-never never turn arrays into uninterpreted functions\n " // NOLINT(*)
1067
938
" --arrays-uf-always always turn arrays into uninterpreted functions\n " // NOLINT(*)
1068
939
" \n "
@@ -1075,8 +946,6 @@ void cbmc_parse_optionst::help()
1075
946
HELP_FLUSH
1076
947
" --verbosity # verbosity level\n "
1077
948
HELP_TIMESTAMP
1078
- " --write-solver-stats-to json-file\n "
1079
- " collect the solver query complexity\n "
1080
949
" --show-array-constraints show array theory constraints added\n "
1081
950
" during post processing.\n "
1082
951
" Requires --json-ui.\n "
0 commit comments