cprover
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
33
34#include <json/json_interface.h>
36
37class goto_functiont;
39class optionst;
40
41// clang-format off
42#define JBMC_OPTIONS \
43 OPT_BMC \
44 "(preprocess)" \
45 OPT_FUNCTIONS \
46 "(no-simplify)(full-slice)" \
47 OPT_REACHABILITY_SLICER \
48 "(debug-level):(no-propagation)(no-simplify-if)" \
49 "(document-subgoals)(outfile):" \
50 "(object-bits):" \
51 "(classpath):(cp):" \
52 OPT_JAVA_JAR \
53 "(main-class):" \
54 OPT_JAVA_GOTO_BINARY \
55 "(no-assertions)(no-assumptions)" \
56 OPT_XML_INTERFACE \
57 OPT_JSON_INTERFACE \
58 "(smt1)(smt2)(fpa)(cvc3)(cvc4)(boolector)(yices)(z3)(mathsat)" \
59 "(no-sat-preprocessor)" \
60 "(beautify)" \
61 "(dimacs)(refine)(max-node-refinement):(refine-arrays)(refine-arithmetic)"\
62 OPT_STRING_REFINEMENT \
63 "(16)(32)(64)(LP64)(ILP64)(LLP64)(ILP32)(LP32)" \
64 OPT_SHOW_GOTO_FUNCTIONS \
65 OPT_SHOW_CLASS_HIERARCHY \
66 "(show-loops)" \
67 "(show-symbol-table)" \
68 "(list-symbols)" \
69 "(show-parse-tree)" \
70 OPT_SHOW_PROPERTIES \
71 "(drop-unused-functions)" \
72 "(property):(stop-on-fail)(trace)" \
73 "(verbosity):" \
74 "(nondet-static)" \
75 OPT_JAVA_TRACE_VALIDATION \
76 "(version)" \
77 "(symex-coverage-report):" \
78 OPT_TIMESTAMP \
79 "(i386-linux)(i386-macos)(i386-win32)(win32)(winx64)" \
80 "(ppc-macos)" \
81 "(arrays-uf-always)(arrays-uf-never)" \
82 "(no-arch)(arch):" \
83 OPT_FLUSH \
84 JAVA_BYTECODE_LANGUAGE_OPTIONS \
85 "(java-unwind-enum-static)" \
86 "(localize-faults)" \
87 "(java-threading)" \
88 OPT_GOTO_TRACE \
89 OPT_VALIDATE \
90 "(symex-driven-lazy-loading)"
91// clang-format on
92
94{
95public:
96 virtual int doit() override;
97 virtual void help() override;
98
99 jbmc_parse_optionst(int argc, const char **argv);
101 int argc,
102 const char **argv,
103 const std::string &extra_options);
104
109 static void set_default_options(optionst &);
110
112 goto_model_functiont &function,
113 const abstract_goto_modelt &,
114 const optionst &);
115 bool process_goto_functions(goto_modelt &goto_model, const optionst &options);
116
117 bool can_generate_function_body(const irep_idt &name);
118
120 const irep_idt &function_name,
121 symbol_table_baset &symbol_table,
122 goto_functiont &function,
123 bool body_available);
124
125protected:
128
129 std::unique_ptr<class_hierarchyt> class_hierarchy;
130
133 std::unique_ptr<abstract_goto_modelt> &goto_model,
134 const optionst &);
135 bool show_loaded_functions(const abstract_goto_modelt &goto_model);
136 bool show_loaded_symbols(const abstract_goto_modelt &goto_model);
137
142};
143
144#endif // CPROVER_JBMC_JBMC_PARSE_OPTIONS_H
Bounded Model Checking Utilities.
Class Hierarchy.
Abstract interface to eager or lazy GOTO models.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:37
A goto function, consisting of function body (see body) and parameter identifiers (see parameter_iden...
Definition: goto_function.h:24
Interface providing access to a single function in a GOTO model, plus its associated symbol table.
Definition: goto_model.h:183
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
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)
optionalt< prefix_filtert > method_context
See java_bytecode_languaget::method_context.
int get_goto_program(std::unique_ptr< abstract_goto_modelt > &goto_model, const optionst &)
jbmc_parse_optionst(int argc, const char **argv)
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.
Check for Errors in Java Programs.
Traces of GOTO Programs.
JSON Commandline Interface.
Abstract interface to support a programming language.
nonstd::optional< T > optionalt
Definition: optional.h:35
Show the properties.
String support via creating string constraints and progressively instantiating the universal constrai...
Emit timestamps.
XML Interface.