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  OPT_GOTO_CHECK \
51  "(no-assertions)(no-assumptions)" \
52  "(no-built-in-assertions)" \
53  "(xml-ui)(json-ui)" \
54  "(smt1)(smt2)(fpa)(cvc3)(cvc4)(boolector)(yices)(z3)(opensmt)(mathsat)" \
55  "(no-sat-preprocessor)" \
56  "(beautify)" \
57  "(dimacs)(refine)(max-node-refinement):(refine-arrays)(refine-arithmetic)"\
58  "(refine-strings)" \
59  "(string-printable)" \
60  "(string-max-length):" \
61  "(string-max-input-length):" \
62  "(16)(32)(64)(LP64)(ILP64)(LLP64)(ILP32)(LP32)" \
63  OPT_SHOW_GOTO_FUNCTIONS \
64  OPT_SHOW_CLASS_HIERARCHY \
65  "(show-loops)" \
66  "(show-symbol-table)(show-parse-tree)" \
67  OPT_SHOW_PROPERTIES \
68  "(drop-unused-functions)" \
69  "(property):(stop-on-fail)(trace)" \
70  "(verbosity):" \
71  "(version)" \
72  "(cover):(symex-coverage-report):" \
73  OPT_TIMESTAMP \
74  "(i386-linux)(i386-macos)(i386-win32)(win32)(winx64)" \
75  "(ppc-macos)" \
76  "(arrays-uf-always)(arrays-uf-never)" \
77  "(no-arch)(arch):" \
78  OPT_FLUSH \
79  JAVA_BYTECODE_LANGUAGE_OPTIONS \
80  "(java-unwind-enum-static)" \
81  "(localize-faults)(localize-faults-method):" \
82  "(java-threading)" \
83  OPT_GOTO_TRACE \
84  "(symex-driven-lazy-loading)"
85 // clang-format on
86 
88  public parse_options_baset,
89  public messaget
90 {
91 public:
92  virtual int doit() override;
93  virtual void help() override;
94 
95  jbmc_parse_optionst(int argc, const char **argv);
97  int argc,
98  const char **argv,
99  const std::string &extra_options);
100 
102  goto_model_functiont &function,
103  const abstract_goto_modelt &,
104  const optionst &);
105  bool process_goto_functions(goto_modelt &goto_model, const optionst &options);
106 
107  bool can_generate_function_body(const irep_idt &name);
108 
110  const irep_idt &function_name,
111  symbol_table_baset &symbol_table,
112  goto_functiont &function,
113  bool body_available);
114 
115 protected:
117  std::unique_ptr<cover_configt> cover_config;
121 
123  int get_goto_program(
124  std::unique_ptr<goto_modelt> &goto_model, const optionst &);
125  bool show_loaded_functions(const abstract_goto_modelt &goto_model);
126 
127  bool set_properties(goto_modelt &goto_model);
128 };
129 
130 #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.
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:119
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.
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