CBMC
cbmc_parse_options.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: CBMC Command Line Option Processing
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_CBMC_CBMC_PARSE_OPTIONS_H
13 #define CPROVER_CBMC_CBMC_PARSE_OPTIONS_H
14 
15 #include <util/parse_options.h>
16 #include <util/timestamper.h>
17 #include <util/ui_message.h>
19 
22 
23 #include <ansi-c/ansi_c_language.h>
24 #include <ansi-c/goto_check_c.h>
25 #include <goto-checker/bmc_util.h>
26 #include <goto-instrument/cover.h>
27 #include <json/json_interface.h>
28 #include <langapi/language.h>
30 #include <xmllang/xml_interface.h>
31 
32 class optionst;
33 
34 // clang-format off
35 #define CBMC_OPTIONS \
36  OPT_BMC \
37  "(no-standard-checks)" \
38  "(preprocess)(slice-by-trace):" \
39  OPT_FUNCTIONS \
40  "(no-simplify)(full-slice)" \
41  OPT_REACHABILITY_SLICER \
42  "(no-propagation)(no-simplify-if)" \
43  "(document-subgoals)(test-preprocessor)" \
44  "(show-array-constraints)" \
45  OPT_CONFIG_C_CPP \
46  OPT_CONFIG_PLATFORM \
47  OPT_CONFIG_BACKEND \
48  OPT_CONFIG_LIBRARY \
49  OPT_GOTO_CHECK \
50  OPT_XML_INTERFACE \
51  OPT_JSON_INTERFACE \
52  OPT_SOLVER \
53  OPT_STRING_REFINEMENT_CBMC \
54  OPT_SHOW_GOTO_FUNCTIONS \
55  OPT_SHOW_PROPERTIES \
56  "(show-symbol-table)(show-parse-tree)" \
57  "(drop-unused-functions)" \
58  "(havoc-undefined-functions)" \
59  "(property):(stop-on-fail)(trace)" \
60  "(verbosity):(no-library)" \
61  "(nondet-static)" \
62  "(version)" \
63  "(export-symex-ready-goto):" \
64  OPT_COVER \
65  "(symex-coverage-report):" \
66  "(mm):" \
67  OPT_TIMESTAMP \
68  "(arrays-uf-always)(arrays-uf-never)" \
69  OPT_FLUSH \
70  "(localize-faults)" \
71  OPT_GOTO_TRACE \
72  OPT_VALIDATE \
73  OPT_ANSI_C_LANGUAGE \
74  "(claim):(show-claims)(floatbv)(all-claims)(all-properties)" // legacy, and will eventually disappear // NOLINT(whitespace/line_length)
75 // clang-format on
76 
78 {
79 public:
80  virtual int doit() override;
81  virtual void help() override;
82 
83  cbmc_parse_optionst(int argc, const char **argv);
85  int argc,
86  const char **argv,
87  const std::string &extra_options);
88 
93  static void set_default_options(optionst &);
94 
99  static void set_default_analysis_flags(optionst &, const bool enabled);
100  static bool process_goto_program(goto_modelt &, const optionst &, messaget &);
101 
102  static int get_goto_program(
103  goto_modelt &,
104  const optionst &,
105  const cmdlinet &,
107 
108 protected:
110 
111  void register_languages() override;
113  void preprocessing(const optionst &);
114  bool set_properties();
115 };
116 
117 #endif // CPROVER_CBMC_CBMC_PARSE_OPTIONS_H
Bounded Model Checking Utilities.
virtual int doit() override
invoke main modules
static bool process_goto_program(goto_modelt &, const optionst &, messaget &)
static void set_default_options(optionst &)
Set the options that have default values.
static int get_goto_program(goto_modelt &, const optionst &, const cmdlinet &, ui_message_handlert &)
void get_command_line_options(optionst &)
void register_languages() override
void preprocessing(const optionst &)
static void set_default_analysis_flags(optionst &, const bool enabled)
Setup default analysis flags.
virtual void help() override
display command line help
cbmc_parse_optionst(int argc, const char **argv)
Class that provides messages with a built-in verbosity 'level'.
Definition: message.h:155
Coverage Instrumentation.
Program Transformation.
Symbol Table + CFG.
Traces of GOTO Programs.
JSON Commandline Interface.
Abstract interface to support a programming language.
String support via creating string constraints and progressively instantiating the universal constrai...
Emit timestamps.
XML Interface.