SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
parser_smtlib.cpp
Go to the documentation of this file.
1 #include "parser_smtlib.h"
2 
3 #include "config.h"
5 
6 #ifdef CLI_ENABLE_FORMULAPARSER
7 
8 #include "execute_smtlib.h"
9 #include "parser_smtlib_utils.h"
10 
11 namespace smtrat {
12 
13 FormulaT parse_smtlib(const std::string& filename) {
14  auto e = parseformula::FormulaCollector();
15  executeFile(filename, e);
16  return e.getFormula();
17 }
18 
19 }
20 
21 #else
22 
23 namespace smtrat {
24 
25 FormulaT parse_smtlib(const std::string&) {
26  SMTRAT_LOG_ERROR("smtrat", "This version of SMT-RAT was compiled without support for stand-alone formula parsing. Please enable it by setting the corresponding CMake option.");
27  return FormulaT();
28 }
29 
30 }
31 
32 #endif
Class to create the formulas for axioms.
carl::Formula< Poly > FormulaT
Definition: types.h:37
FormulaT parse_smtlib(const std::string &)
int executeFile(const std::string &pathToInputFile, Executor &e)
Parse the file and save it in formula.
#define SMTRAT_LOG_ERROR(channel, msg)
Definition: logging.h:32