CBMC
api_options.cpp
Go to the documentation of this file.
1 // Author: Fotis Koutoulakis for Diffblue Ltd.
2 
3 #include "api_options.h"
4 
5 #include <util/cmdline.h>
6 #include <util/options.h>
7 
10 
12 {
13  return api_optionst{};
14 }
15 
16 static std::unique_ptr<optionst> make_internal_default_options()
17 {
18  std::unique_ptr<optionst> options = std::make_unique<optionst>();
19  cmdlinet command_line;
20  PARSE_OPTIONS_GOTO_CHECK(command_line, (*options));
21  parse_solver_options(command_line, *options);
22  options->set_option("built-in-assertions", true);
23  options->set_option("arrays-uf", "auto");
24  options->set_option("depth", UINT32_MAX);
25  options->set_option("sat-preprocessor", true);
26  return options;
27 }
28 
30 {
31  simplify_enabled = on;
32  return *this;
33 }
34 
36 {
38  return *this;
39 }
40 
42 {
44  return *this;
45 }
46 
47 std::unique_ptr<optionst> api_optionst::to_engine_options() const
48 {
49  auto engine_options = make_internal_default_options();
50  engine_options->set_option("simplify", simplify_enabled);
51  return engine_options;
52 }
static std::unique_ptr< optionst > make_internal_default_options()
Definition: api_options.cpp:16
api_optionst & drop_unused_functions(bool on)
Definition: api_options.cpp:35
bool simplify_enabled
Definition: api_options.h:13
api_optionst & simplify(bool on)
Definition: api_options.cpp:29
bool drop_unused_functions_enabled
Definition: api_options.h:16
std::unique_ptr< optionst > to_engine_options() const
Definition: api_options.cpp:47
bool validate_goto_model_enabled
Definition: api_options.h:19
static api_optionst create()
Definition: api_options.cpp:11
api_optionst & validate_goto_model(bool on)
Definition: api_options.cpp:41
Program Transformation.
#define PARSE_OPTIONS_GOTO_CHECK(cmdline, options)
Definition: goto_check_c.h:109
Options.
void parse_solver_options(const cmdlinet &cmdline, optionst &options)
Parse solver-related command-line parameters in cmdline and set corresponding values in options.
Solver Factory.