SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
SettingsParser.cpp
Go to the documentation of this file.
1 #include "SettingsParser.h"
2 
3 #include "Settings.h"
4 
5 namespace smtrat {
6 
7 namespace po = boost::program_options;
8 
10  mPositional.add("input-file", 1);
11 
12  auto& settings = settings::Settings::getInstance();
13 
14  {
15  auto& s = settings.get<settings::CoreSettings>("core");
16  add("Core settings").add_options()
17  ("help", po::bool_switch(&s.show_help), "show help")
18  ("info", po::bool_switch(&s.show_info), "show some basic information about this binary")
19  ("version", po::bool_switch(&s.show_version), "show the version of this binary")
20  ("settings", po::bool_switch(&s.show_settings), "show the settings that are used")
21  ("cmake-options", po::bool_switch(&s.show_cmake_options), "show the cmake options during compilation")
22  ("strategy", po::bool_switch(&s.show_strategy), "show the configured strategy")
23  ("license", po::bool_switch(&s.show_license), "show the license")
24  ("config,c", po::value<std::string>(&s.config_file), "load config from the given config file")
25  ;
26  }
27 
28  {
29  auto& s = settings.get<settings::SolverSettings>("solver");
30  add("Solver settings").add_options()
31  ("preprocess", po::bool_switch(&s.preprocess), "only preprocess the input (only available if compiled with corresponding CMake option)")
32  ("pp-output-file", po::value<std::string>(&s.preprocess_output_file), "store the preprocessed input to this file")
33  ("to-cnf-dimacs", po::bool_switch(&s.convert_to_cnf_dimacs), "transform formula to cnf as dimacs (only available if compiled with corresponding CMake option)")
34  ("to-cnf-smtlib", po::bool_switch(&s.convert_to_cnf_smtlib), "transform formula to cnf as smtlib (only available if compiled with corresponding CMake option)")
35  ("print-model", po::bool_switch(&s.print_model), "print a model if the input is satisfiable")
36  ("print-all-models", po::bool_switch(&s.print_all_models), "print all models of the input")
37  ;
38  }
39 
40  {
41  auto& s = settings.get<settings::ModuleSettings>("module");
42  add("Module settings").add_options()
43  ("module.parameter", po::value<std::vector<std::string>>(&s.parameters), "add a parameter for modules (key=value)")
44  ;
45  }
46 }
47 
48 }
Class to create the formulas for axioms.