20 #include <sys/resource.h>
23 #ifdef SMTRAT_DEVOPTION_Statistics
24 #include <carl-statistics/StatisticsCollector.h>
25 #include <carl-statistics/StatisticsPrinter.h>
29 #ifdef SMTRAT_DEVOPTION_Validation
41 #include <carl-io/SMTLIBStream.h>
42 #include <carl-logging/logging-internals.h>
55 #ifdef SMTRAT_DEVOPTION_Statistics
56 carl::statistics::StatisticsCollector::getInstance().collect();
58 std::cout << carl::statistics::statistics_as_smtlib() << std::endl;
67 #ifdef SMTRAT_DEVOPTION_Validation
76 if (!carl::logging::logger().has(
"smtrat")) {
77 carl::logging::logger().configure(
"smtrat",
"smtrat.log");
79 if (!carl::logging::logger().has(
"stdout")) {
80 carl::logging::logger().configure(
"stdout", std::cout);
83 carl::logging::logger().filter(
"smtrat")
84 (
"smtrat", carl::logging::LogLevel::LVL_INFO)
86 carl::logging::logger().filter(
"stdout")
87 (
"smtrat", carl::logging::LogLevel::LVL_DEBUG)
88 (
"smtrat.module", carl::logging::LogLevel::LVL_DEBUG)
89 (
"smtrat.parser", carl::logging::LogLevel::LVL_INFO)
90 (
"smtrat.strategygraph", carl::logging::LogLevel::LVL_INFO)
95 carl::logging::logger().formatter(
"stdout")->printInformation =
true;
101 std::quick_exit(143);
104 int main(
int argc,
char* argv[] )
109 auto& parser = smtrat::SettingsParser::getInstance();
111 #ifdef SMTRAT_DEVOPTION_Statistics
114 #ifdef SMTRAT_DEVOPTION_Validation
117 #ifdef CLI_ENABLE_ANALYZER
120 smtrat::SettingsComponents::getInstance().add_to_parser(parser);
122 parser.parse_options(argc, argv);
128 return basic_exitcode;
148 strategy.printStrategyGraph();
157 smtrat::resource::Limiter::getInstance().setTimeoutHandler(&
print_statistics);
163 if (
is_sat(e.lastAnswer)) {
165 strategy.printAllAssignments(std::cout);
167 strategy.printAssignment();
171 }
catch (
const std::bad_alloc& e) {
constexpr int SMTRAT_EXIT_UNDEFINED
void registerAnalyzerSettings(T &parser)
void registerParserSettings(T &parser)
void registerStatisticsSettings(T &parser)
void validation_formulas_to_smtlib_file(const std::string &filename)
void registerValidationSettings(T &parser)
const auto & settings_validation()
int handle_basic_options(const SettingsParser &parser)
const auto & settings_core()
int preprocess_file(const std::string &, const std::string &)
Loads the smt2 file specified in filename and runs the preprocessing strategy.
int convert_to_cnf_dimacs(const std::string &, const std::string &)
int analyze_file(const std::string &)
int convert_to_cnf_smtlib(const std::string &, const std::string &)
const auto & settings_solver()
int executeFile(const std::string &pathToInputFile, Executor &e)
Parse the file and save it in formula.
const auto & settings_analyzer()
int run_dimacs_file(Strategy &, const std::string &)
int run_opb_file(Strategy &, const std::string &)
const auto & settings_parser()
const auto & settings_statistics()
#define SMTRAT_LOG_INFO(channel, msg)
#define SMTRAT_LOG_DEBUG(channel, msg)
#define CMakeStrategySolver
int main(int argc, char *argv[])
void store_validation_formulas()