6 #ifdef CLI_ENABLE_CNF_CONVERSION
11 #include <carl-formula/formula/functions/CNF.h>
12 #include <carl-io/DIMACSExporter.h>
13 #include <carl-io/SMTLIBStream.h>
18 auto e = parseformula::FormulaCollector();
21 carl::io::DIMACSExporter<Poly> exporter;
22 exporter(carl::to_cnf(e.getFormula()));
24 if (outfile.empty()) {
25 e.regular() << exporter;
27 std::ofstream file(outfile);
36 auto e = parseformula::FormulaCollector();
39 auto f_in_cnf = carl::to_cnf(e.getFormula());
41 if (outfile.empty()) {
42 e.regular() << carl::io::outputSMTLIB(e.getLogic(), { f_in_cnf });
44 std::ofstream file(outfile);
45 file << carl::io::outputSMTLIB(e.getLogic(), { f_in_cnf });
59 SMTRAT_LOG_ERROR(
"smtrat",
"This version of SMT-RAT was compiled without support for stand-alone CNF conversion. Please enable it by setting the corresponding CMake option.");
64 SMTRAT_LOG_ERROR(
"smtrat",
"This version of SMT-RAT was compiled without support for stand-alone CNF conversion. Please enable it by setting the corresponding CMake option.");
Class to create the formulas for axioms.
int convert_to_cnf_dimacs(const std::string &, const std::string &)
int convert_to_cnf_smtlib(const std::string &, 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)