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 
27 #include <goto-checker/bmc_util.h>
29 
31 
33 
34 #include <json/json_interface.h>
35 #include <xmllang/xml_interface.h>
36 
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  "(write-solver-stats-to):" \
50  "D:I:(c89)(c99)(c11)(cpp98)(cpp03)(cpp11)" \
51  "(object-bits):" \
52  OPT_GOTO_CHECK \
53  "(no-assertions)(no-assumptions)" \
54  "(malloc-fail-assert)(malloc-fail-null)" \
55  "(malloc-may-fail)" \
56  OPT_XML_INTERFACE \
57  OPT_JSON_INTERFACE \
58  "(smt1)(smt2)(fpa)(cvc3)(cvc4)(boolector)(yices)(z3)(mathsat)" \
59  "(cprover-smt2)" \
60  "(external-sat-solver):" \
61  "(no-sat-preprocessor)" \
62  "(beautify)" \
63  "(dimacs)(refine)(max-node-refinement):(refine-arrays)(refine-arithmetic)"\
64  OPT_STRING_REFINEMENT_CBMC \
65  "(16)(32)(64)(LP64)(ILP64)(LLP64)(ILP32)(LP32)" \
66  "(little-endian)(big-endian)" \
67  OPT_SHOW_GOTO_FUNCTIONS \
68  OPT_SHOW_PROPERTIES \
69  "(show-symbol-table)(show-parse-tree)" \
70  "(drop-unused-functions)" \
71  "(havoc-undefined-functions)" \
72  "(property):(stop-on-fail)(trace)" \
73  "(error-label):(verbosity):(no-library)" \
74  "(nondet-static)" \
75  "(version)" \
76  "(cover):(symex-coverage-report):" \
77  "(mm):" \
78  OPT_TIMESTAMP \
79  "(i386-linux)(i386-macos)(i386-win32)(win32)(winx64)(gcc)" \
80  "(ppc-macos)(unsigned-char)" \
81  "(arrays-uf-always)(arrays-uf-never)" \
82  "(string-abstraction)(no-arch)(arch):" \
83  "(round-to-nearest)(round-to-plus-inf)(round-to-minus-inf)(round-to-zero)" \
84  OPT_FLUSH \
85  "(localize-faults)" \
86  OPT_GOTO_TRACE \
87  OPT_VALIDATE \
88  OPT_ANSI_C_LANGUAGE \
89  "(claim):(show-claims)(floatbv)(all-claims)(all-properties)" // legacy, and will eventually disappear // NOLINT(whitespace/line_length)
90 // clang-format on
91 
93 {
94 public:
95  virtual int doit() override;
96  virtual void help() override;
97 
98  cbmc_parse_optionst(int argc, const char **argv);
100  int argc,
101  const char **argv,
102  const std::string &extra_options);
103 
108  static void set_default_options(optionst &);
109 
110  static bool process_goto_program(goto_modelt &, const optionst &, messaget &);
111 
112  static int get_goto_program(
113  goto_modelt &,
114  const optionst &,
115  const cmdlinet &,
117 
118 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
messaget
Class that provides messages with a built-in verbosity 'level'.
Definition: message.h:155
cbmc_parse_optionst::doit
virtual int doit() override
invoke main modules
Definition: cbmc_parse_options.cpp:527
cbmc_parse_optionst::goto_model
goto_modelt goto_model
Definition: cbmc_parse_options.h:119
cbmc_parse_optionst::get_goto_program
static int get_goto_program(goto_modelt &, const optionst &, const cmdlinet &, ui_message_handlert &)
Definition: cbmc_parse_options.cpp:793
parse_options_baset
Definition: parse_options.h:20
ui_message_handlert
Definition: ui_message.h:20
optionst
Definition: options.h:23
json_interface.h
JSON Commandline Interface.
validation_interface.h
goto_modelt
Definition: goto_model.h:26
cbmc_parse_optionst::cbmc_parse_optionst
cbmc_parse_optionst(int argc, const char **argv)
Definition: cbmc_parse_options.cpp:87
cbmc_parse_optionst::register_languages
void register_languages()
Definition: cbmc_languages.cpp:25
goto_trace.h
Traces of GOTO Programs.
bmc_util.h
Bounded Model Checking Utilities.
cbmc_parse_optionst
Definition: cbmc_parse_options.h:93
cmdlinet
Definition: cmdline.h:21
c_object_factory_parameters.h
cbmc_parse_optionst::get_command_line_options
void get_command_line_options(optionst &)
Definition: cbmc_parse_options.cpp:130
language.h
Abstract interface to support a programming language.
cbmc_parse_optionst::process_goto_program
static bool process_goto_program(goto_modelt &, const optionst &, messaget &)
Definition: cbmc_parse_options.cpp:877
string_refinement.h
String support via creating string constraints and progressively instantiating the universal constrai...
parse_options.h
goto_check.h
Program Transformation.
solver_factory.h
Solver Factory.
cbmc_parse_optionst::set_properties
bool set_properties()
Definition: cbmc_parse_options.cpp:782
goto_functionst
A collection of goto functions.
Definition: goto_functions.h:23
ansi_c_language.h
cbmc_parse_optionst::help
virtual void help() override
display command line help
Definition: cbmc_parse_options.cpp:1017
timestamper.h
Emit timestamps.
xml_interface.h
XML Interface.
cbmc_parse_optionst::set_default_options
static void set_default_options(optionst &)
Set the options that have default values.
Definition: cbmc_parse_options.cpp:112
cbmc_parse_optionst::preprocessing
void preprocessing(const optionst &)
Definition: cbmc_parse_options.cpp:844
ui_message.h