CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
jbmc_parse_options.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: JBMC Command Line Option Processing
4
5Author: 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/parse_options.h>
16#include <util/timestamper.h>
17#include <util/ui_message.h>
19
20#include <langapi/language.h>
21
23
27
29
32
33#include <json/json_interface.h>
35
36class goto_functiont;
38class optionst;
39
40// clang-format off
41#define JBMC_OPTIONS \
42 OPT_BMC \
43 "(preprocess)" \
44 OPT_FUNCTIONS \
45 "(no-simplify)(full-slice)" \
46 OPT_REACHABILITY_SLICER \
47 "(no-propagation)(no-simplify-if)" \
48 "(document-subgoals)" \
49 "(object-bits):" \
50 "(classpath):(cp):" \
51 OPT_JAVA_JAR \
52 "(main-class):" \
53 OPT_JAVA_GOTO_BINARY \
54 "(no-assertions)(no-assumptions)" \
55 OPT_XML_INTERFACE \
56 OPT_JSON_INTERFACE \
57 "(smt1)" /* rejected, will eventually disappear */ \
58 OPT_SOLVER \
59 OPT_STRING_REFINEMENT \
60 "(16)(32)(64)(LP64)(ILP64)(LLP64)(ILP32)(LP32)" \
61 OPT_SHOW_GOTO_FUNCTIONS \
62 OPT_SHOW_CLASS_HIERARCHY \
63 "(show-loops)" \
64 "(show-symbol-table)" \
65 "(list-symbols)" \
66 "(show-parse-tree)" \
67 OPT_SHOW_PROPERTIES \
68 "(drop-unused-functions)" \
69 "(property):(stop-on-fail)(trace)" \
70 "(verbosity):" \
71 "(nondet-static)" \
72 OPT_JAVA_TRACE_VALIDATION \
73 "(version)" \
74 "(symex-coverage-report):" \
75 OPT_TIMESTAMP \
76 "(i386-linux)(i386-macos)(i386-win32)(win32)(winx64)" \
77 "(ppc-macos)" \
78 "(arrays-uf-always)(arrays-uf-never)" \
79 "(arch):" \
80 OPT_FLUSH \
81 JAVA_BYTECODE_LANGUAGE_OPTIONS \
82 "(java-unwind-enum-static)" \
83 "(localize-faults)" \
84 "(java-threading)" \
85 OPT_GOTO_TRACE \
86 OPT_VALIDATE \
87 "(symex-driven-lazy-loading)"
88// clang-format on
89
91{
92public:
93 virtual int doit() override;
94 virtual void help() override;
95
96 jbmc_parse_optionst(int argc, const char **argv);
98 int argc,
99 const char **argv,
100 const std::string &extra_options);
101
106 static void set_default_options(optionst &);
107
109 goto_model_functiont &function,
110 const abstract_goto_modelt &,
111 const optionst &);
112 bool process_goto_functions(goto_modelt &goto_model, const optionst &options);
113
114 bool can_generate_function_body(const irep_idt &name);
115
117 const irep_idt &function_name,
118 symbol_table_baset &symbol_table,
119 goto_functiont &function,
120 bool body_available);
121
122protected:
125
126 std::unique_ptr<class_hierarchyt> class_hierarchy;
127
130 std::unique_ptr<abstract_goto_modelt> &goto_model,
131 const optionst &);
132 bool show_loaded_functions(const abstract_goto_modelt &goto_model);
133 bool show_loaded_symbols(const abstract_goto_modelt &goto_model);
134
138 std::optional<prefix_filtert> method_context;
139};
140
141#endif // CPROVER_JBMC_JBMC_PARSE_OPTIONS_H
Bounded Model Checking Utilities.
Class Hierarchy.
Abstract interface to eager or lazy GOTO models.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition dstring.h:38
A goto function, consisting of function body (see body) and parameter identifiers (see parameter_iden...
Interface providing access to a single function in a GOTO model, plus its associated symbol table.
Definition goto_model.h:190
bool show_loaded_functions(const abstract_goto_modelt &goto_model)
void get_command_line_options(optionst &)
bool can_generate_function_body(const irep_idt &name)
std::unique_ptr< class_hierarchyt > class_hierarchy
bool show_loaded_symbols(const abstract_goto_modelt &goto_model)
virtual int doit() override
invoke main modules
std::optional< prefix_filtert > method_context
See java_bytecode_languaget::method_context.
virtual void help() override
display command line help
void process_goto_function(goto_model_functiont &function, const abstract_goto_modelt &, const optionst &)
java_object_factory_parameterst object_factory_params
bool process_goto_functions(goto_modelt &goto_model, const optionst &options)
int get_goto_program(std::unique_ptr< abstract_goto_modelt > &goto_model, const optionst &)
bool generate_function_body(const irep_idt &function_name, symbol_table_baset &symbol_table, goto_functiont &function, bool body_available)
static void set_default_options(optionst &)
Set the options that have default values.
The symbol table base class interface.
Traces of GOTO Programs.
JSON Commandline Interface.
Abstract interface to support a programming language.
Show the properties.
String support via creating string constraints and progressively instantiating the universal constrai...
Emit timestamps.
XML Interface.