cprover
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 <ansi-c/ansi_c_language.h>
17 
18 #include <util/parse_options.h>
19 #include <util/timestamper.h>
20 #include <util/ui_message.h>
22 
23 #include <langapi/language.h>
24 
25 #include <analyses/goto_check.h>
26 
28 
30 
32 
33 #include "bmc.h"
34 #include "xml_interface.h"
35 
36 class bmct;
37 class goto_functionst;
38 class optionst;
39 
40 // clang-format off
41 #define CBMC_OPTIONS \
42  OPT_BMC \
43  "(preprocess)(slice-by-trace):" \
44  OPT_FUNCTIONS \
45  "(no-simplify)(full-slice)" \
46  OPT_REACHABILITY_SLICER \
47  "(debug-level):(no-propagation)(no-simplify-if)" \
48  "(document-subgoals)(outfile):(test-preprocessor)" \
49  "D:I:(c89)(c99)(c11)(cpp98)(cpp03)(cpp11)" \
50  "(object-bits):" \
51  OPT_GOTO_CHECK \
52  "(no-assertions)(no-assumptions)" \
53  "(xml-ui)(xml-interface)(json-ui)" \
54  "(smt1)(smt2)(fpa)(cvc3)(cvc4)(boolector)(yices)(z3)(mathsat)" \
55  "(cprover-smt2)" \
56  "(no-sat-preprocessor)" \
57  "(beautify)" \
58  "(dimacs)(refine)(max-node-refinement):(refine-arrays)(refine-arithmetic)"\
59  OPT_STRING_REFINEMENT_CBMC \
60  "(16)(32)(64)(LP64)(ILP64)(LLP64)(ILP32)(LP32)" \
61  "(little-endian)(big-endian)" \
62  OPT_SHOW_GOTO_FUNCTIONS \
63  OPT_SHOW_PROPERTIES \
64  "(show-symbol-table)(show-parse-tree)" \
65  "(drop-unused-functions)" \
66  "(property):(stop-on-fail)(trace)" \
67  "(error-label):(verbosity):(no-library)" \
68  "(nondet-static)" \
69  "(version)" \
70  "(cover):(symex-coverage-report):" \
71  "(mm):" \
72  OPT_TIMESTAMP \
73  "(i386-linux)(i386-macos)(i386-win32)(win32)(winx64)(gcc)" \
74  "(ppc-macos)(unsigned-char)" \
75  "(arrays-uf-always)(arrays-uf-never)" \
76  "(string-abstraction)(no-arch)(arch):" \
77  "(round-to-nearest)(round-to-plus-inf)(round-to-minus-inf)(round-to-zero)" \
78  OPT_FLUSH \
79  "(localize-faults)(localize-faults-method):" \
80  OPT_GOTO_TRACE \
81  OPT_VALIDATE \
82  OPT_ANSI_C_LANGUAGE \
83  "(claim):(show-claims)(floatbv)(all-claims)(all-properties)" // legacy, and will eventually disappear // NOLINT(whitespace/line_length)
84 // clang-format on
85 
87  public parse_options_baset,
88  public xml_interfacet,
89  public messaget
90 {
91 public:
92  virtual int doit() override;
93  virtual void help() override;
94 
95  cbmc_parse_optionst(int argc, const char **argv);
97  int argc,
98  const char **argv,
99  const std::string &extra_options);
100 
105  static void set_default_options(optionst &);
106 
107  static bool process_goto_program(goto_modelt &, const optionst &, messaget &);
108 
109  static int get_goto_program(
110  goto_modelt &,
111  const optionst &,
112  const cmdlinet &,
113  messaget &,
115 
116 protected:
120 
121  void register_languages();
123  void preprocessing(const optionst &);
124  bool set_properties();
125 };
126 
127 #endif // CPROVER_CBMC_CBMC_PARSE_OPTIONS_H
void get_command_line_options(optionst &)
static int get_goto_program(goto_modelt &, const optionst &, const cmdlinet &, messaget &, ui_message_handlert &)
Traces of GOTO Programs.
const path_strategy_choosert path_strategy_chooser
Factory and information for path_storaget.
Definition: path_storage.h:129
static bool process_goto_program(goto_modelt &, const optionst &, messaget &)
void preprocessing(const optionst &)
Abstract interface to support a programming language.
A collection of goto functions.
Program Transformation.
Class that provides messages with a built-in verbosity &#39;level&#39;.
Definition: message.h:144
String support via creating string constraints and progressively instantiating the universal constrai...
virtual int doit() override
invoke main modules
static void set_default_options(optionst &)
Set the options that have default values.
Bounded Model Checking for ANSI-C + HDL.
cbmc_parse_optionst(int argc, const char **argv)
Emit timestamps.
Bounded model checking or path exploration for goto-programs.
Definition: bmc.h:41
Solver Factory.
ui_message_handlert ui_message_handler
XML Interface.
virtual void help() override
display command line help