SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
Validation.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../config.h"
4 #include "ValidationCollector.h"
5 #include "ValidationSettings.h"
6 
7 namespace smtrat {
8  inline auto& validation_get(const std::string& channel, const std::string& file, int line) {
9  return smtrat::validation::get(channel, file, line);
10  }
11 
12  #ifdef SMTRAT_DEVOPTION_Validation
13  #define SMTRAT_VALIDATION_INIT(channel, variable) auto& variable = smtrat::validation::get(channel, __FILE__, __LINE__)
14  #define SMTRAT_VALIDATION_INIT_STATIC(channel, variable) static auto& variable = smtrat::validation::get(channel, __FILE__, __LINE__)
15  #define SMTRAT_VALIDATION_ADD_TO(variable, name, formula, consistent) { \
16  if (settings_validation().channel_active(variable.channel())) { \
17  auto id = variable.add(formula, consistent, name); \
18  SMTRAT_LOG_DEBUG(variable.channel(), "Assumption " << variable.identifier() << " #" << id << " (" << name << "): " << formula); \
19  } \
20  }
21  #define SMTRAT_VALIDATION_ADD(channel, name, formula, consistent) { SMTRAT_VALIDATION_INIT_STATIC(channel,tmp); SMTRAT_VALIDATION_ADD_TO(tmp,name,formula,consistent); }
22  #else
23  #define SMTRAT_VALIDATION_INIT(channel, variable)
24  #define SMTRAT_VALIDATION_INIT_STATIC(channel, variable)
25  #define SMTRAT_VALIDATION_ADD_TO(variable, name, formula, consistent)
26  #define SMTRAT_VALIDATION_ADD(channel, name, formula, consistent)
27  #endif
28 }
auto & get(const std::string &channel, const std::string &file, int line)
Class to create the formulas for axioms.
auto & validation_get(const std::string &channel, const std::string &file, int line)
Definition: Validation.h:8