cprover
jbmc_parse_options.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: JBMC Command Line Option Processing
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
11 
12 #ifndef CPROVER_JBMC_JBMC_PARSE_OPTIONS_H
13 #define CPROVER_JBMC_JBMC_PARSE_OPTIONS_H
14 
15 #include <util/ui_message.h>
16 #include <util/parse_options.h>
17 #include <util/timestamper.h>
18 
19 #include <langapi/language.h>
20 
21 #include <analyses/goto_check.h>
22 
23 #include <cbmc/bmc.h>
24 
25 #include <goto-instrument/cover.h>
30 
32 
34 
35 class bmct;
36 class goto_functionst;
37 class optionst;
38 
39 // clang-format off
40 #define JBMC_OPTIONS \
41  OPT_BMC \
42  "(preprocess)(slice-by-trace):" \
43  OPT_FUNCTIONS \
44  "(no-simplify)(full-slice)" \
45  OPT_REACHABILITY_SLICER \
46  "(debug-level):(no-propagation)(no-simplify-if)" \
47  "(document-subgoals)(outfile):" \
48  "(object-bits):" \
49  "(classpath):(cp):(main-class):" \
50  "(no-assertions)(no-assumptions)" \
51  "(xml-ui)(json-ui)" \
52  "(smt1)(smt2)(fpa)(cvc3)(cvc4)(boolector)(yices)(z3)(opensmt)(mathsat)" \
53  "(no-sat-preprocessor)" \
54  "(beautify)" \
55  "(dimacs)(refine)(max-node-refinement):(refine-arrays)(refine-arithmetic)"\
56  "(refine-strings)" /* will go away */ \
57  "(no-refine-strings)" \
58  "(string-printable)" \
59  "(string-max-input-length):" /* will go away */ \
60  "(max-nondet-string-length):" \
61  "(16)(32)(64)(LP64)(ILP64)(LLP64)(ILP32)(LP32)" \
62  OPT_SHOW_GOTO_FUNCTIONS \
63  OPT_SHOW_CLASS_HIERARCHY \
64  "(show-loops)" \
65  "(show-symbol-table)(show-parse-tree)" \
66  OPT_SHOW_PROPERTIES \
67  "(drop-unused-functions)" \
68  "(property):(stop-on-fail)(trace)" \
69  "(verbosity):" \
70  "(version)" \
71  "(cover):(symex-coverage-report):" \
72  OPT_TIMESTAMP \
73  "(i386-linux)(i386-macos)(i386-win32)(win32)(winx64)" \
74  "(ppc-macos)" \
75  "(arrays-uf-always)(arrays-uf-never)" \
76  "(no-arch)(arch):" \
77  OPT_FLUSH \
78  JAVA_BYTECODE_LANGUAGE_OPTIONS \
79  "(java-unwind-enum-static)" \
80  "(localize-faults)(localize-faults-method):" \
81  "(java-threading)" \
82  OPT_GOTO_TRACE \
83  "(symex-driven-lazy-loading)"
84 // clang-format on
85 
87  public parse_options_baset,
88  public messaget
89 {
90 public:
91  virtual int doit() override;
92  virtual void help() override;
93 
94  jbmc_parse_optionst(int argc, const char **argv);
96  int argc,
97  const char **argv,
98  const std::string &extra_options);
99 
104  static void set_default_options(optionst &);
105 
107  goto_model_functiont &function,
108  const abstract_goto_modelt &,
109  const optionst &);
110  bool process_goto_functions(goto_modelt &goto_model, const optionst &options);
111 
112  bool can_generate_function_body(const irep_idt &name);
113 
115  const irep_idt &function_name,
116  symbol_table_baset &symbol_table,
117  goto_functiont &function,
118  bool body_available);
119 
120 protected:
122  std::unique_ptr<cover_configt> cover_config;
126 
128  int get_goto_program(
129  std::unique_ptr<goto_modelt> &goto_model, const optionst &);
130  bool show_loaded_functions(const abstract_goto_modelt &goto_model);
131 
132  bool set_properties(goto_modelt &goto_model);
133 };
134 
135 #endif // CPROVER_JBMC_JBMC_PARSE_OPTIONS_H
bool process_goto_functions(goto_modelt &goto_model, const optionst &options)
jbmc_parse_optionst(int argc, const char **argv)
Abstract interface to eager or lazy GOTO models.
static void set_default_options(optionst &)
Set the options that have default values.
Traces of GOTO Programs.
object_factory_parameterst object_factory_params
void process_goto_function(goto_model_functiont &function, const abstract_goto_modelt &, const optionst &)
std::unique_ptr< cover_configt > cover_config
Factory and information for path_storaget.
Definition: path_storage.h:129
path_strategy_choosert path_strategy_chooser
bool generate_function_body(const irep_idt &function_name, symbol_table_baset &symbol_table, goto_functiont &function, bool body_available)
Class Hierarchy.
bool can_generate_function_body(const irep_idt &name)
Abstract interface to support a programming language.
Program Transformation.
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
Definition: dstring.h:33
virtual int doit() override
invoke main modules
virtual void help() override
display command line help
Author: Diffblue Ltd.
int get_goto_program(std::unique_ptr< goto_modelt > &goto_model, const optionst &)
bool show_loaded_functions(const abstract_goto_modelt &goto_model)
Bounded Model Checking for ANSI-C + HDL.
bool set_properties(goto_modelt &goto_model)
The symbol table base class interface.
Emit timestamps.
Bounded model checking or path exploration for goto-programs.
Definition: bmc.h:41
ui_message_handlert ui_message_handler
void get_command_line_options(optionst &)
Show the properties.
Coverage Instrumentation.
Storage of symbolic execution paths to resume.
Interface providing access to a single function in a GOTO model, plus its associated symbol table...
Definition: goto_model.h:147