SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
ValidationSettings.h
Go to the documentation of this file.
1 #pragma once
2 
3 // #include <smtrat-common/settings/Settings.h>
4 // #include <smtrat-common/settings/SettingsParser.h>
5 #include "../settings/Settings.h"
6 #include "../settings/SettingsParser.h"
7 
8 namespace smtrat {
9 namespace validation {
10 
13  std::string smtlib_filename;
14 
15  std::vector<std::string> channels;
16  bool channel_active(const std::string& key) const {
17  for (const auto& c: channels) {
18  if (key == c || key.rfind(c + ".", 0) == 0) {
19  return true;
20  }
21  }
22  return false;
23  }
24 };
25 
26 template<typename T>
27 void registerValidationSettings(T& parser) {
28  namespace po = boost::program_options;
29  auto& settings = settings::Settings::getInstance();
30  auto& s = settings.get<ValidationSettings>("validation");
31 
32  parser.add("Validation settings").add_options()
33  ("validation.export-smtlib", po::bool_switch(&s.export_as_smtlib), "store validation formulas to smtlib file")
34  ("validation.smtlib-filename", po::value<std::string>(&s.smtlib_filename)->default_value("validation.smt2"), "filename of smtlib output")
35  ("validation.channel", po::value<std::vector<std::string>>(&s.channels), "add a channel to be considered")
36  ;
37 }
38 
39 }
40 
41 inline const auto& settings_validation() {
42  static const auto& s = settings::Settings::getInstance().get<validation::ValidationSettings>("validation");
43  return s;
44 }
45 
46 }
void registerValidationSettings(T &parser)
Class to create the formulas for axioms.
const auto & settings_validation()
bool channel_active(const std::string &key) const