19 template<
typename Pol>
27 std::vector<Formula<Pol>> vars;
28 const char* begin = line.c_str();
32 id = std::strtoll(begin, &end, 10);
36 if (
id > 0) vars.emplace_back(v);
37 else vars.emplace_back(
NOT, v);
44 std::vector<Formula<Pol>> formulas;
46 std::getline(
in, line);
47 if (line ==
"")
continue;
48 if (line ==
"reset")
break;
49 if (line.front() ==
'c')
continue;
50 if (line.front() ==
'p') {
53 CARL_LOG_ERROR(
"carl.formula",
"DIMACS line starting with \"p\" does not match header format: \"" << line <<
"\".");
55 std::size_t varCount = std::stoull(m[1]);
A small wrapper that configures logging for carl.
#define CARL_LOG_ERROR(channel, msg)
Interval< Number > abs(const Interval< Number > &_in)
Method which returns the absolute value of the passed number.
Variable fresh_boolean_variable() noexcept
Represent an SMT formula, which can be an atom for some background theory or a boolean combination of...
Parser for the DIMACS format.
Formula< Pol > next()
Parses and returns the next formula (until the next reset line).
Formula< Pol > parseLine(const std::string &line) const
Formula< Pol > parseFormula()
bool hasNext() const
Checks if there is another formula to parse.
DIMACSImporter(const std::string &filename)
Load the given file.
std::vector< Formula< Pol > > variables