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 (strictp && cnt != clauses)
74 printf(
"PARSE ERROR! DIMACS header mismatch: wrong number of clauses\n");
79 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=false)
static void parse_DIMACS_main(B &in, Solver &S, bool strictp=false)
static int parseInt(B &in)
static void skipWhitespace(B &in)
bool addClause_(vec< Lit > &ps)
Var newVar(lbool upol=l_Undef, bool dvar=true)
void clear(bool dealloc=false)
static void parse_DIMACS(gzFile input_stream, Solver &S, bool strictp=false)
static void skipLine(B &in)