21 #ifndef Minisat_Dimacs_h
22 #define Minisat_Dimacs_h
34 template<
class B,
class Solver>
40 if (parsed_lit == 0)
break;
41 var = abs(parsed_lit)-1;
47 template<
class B,
class Solver>
55 if (*in == EOF)
break;
64 printf(
"PARSE ERROR! Unexpected char: %c\n", *in),
exit(3);
66 }
else if (*in ==
'c' || *in ==
'p')
73 if (vars != S.
nVars())
74 fprintf(stderr,
"WARNING! DIMACS header mismatch: wrong number of variables.\n");
76 fprintf(stderr,
"WARNING! DIMACS header mismatch: wrong number of clauses.\n");
81 template<
class Solver>
static bool eagerMatch(B &in, const char *str)
static void readClause(B &in, Solver &S, vec< Lit > &lits)
Lit mkLit(Var var, bool sign)
static int parseInt(B &in)
static void parse_DIMACS_main(B &in, Solver &S)
static void skipWhitespace(B &in)
bool addClause_(vec< Lit > &ps)
void clear(bool dealloc=false)
Var newVar(bool polarity=true, bool dvar=true)
static void parse_DIMACS(gzFile input_stream, Solver &S)
static void skipLine(B &in)