String out = tmpCNF.getAbsolutePath();
solver.options().setSolver(WriteCNF.factory(out));
try { sol = solver.solve(fgoal, bounds); } catch(WriteCNF.WriteCNFCompleted ex) { rep.resultCNF(out); return null; }
// The formula is trivial (otherwise, it would have thrown an exception)
// Since the user wants it in CNF format, we manually generate a trivially satisfiable (or unsatisfiable) CNF file.
Util.writeAll(out, sol.instance()!=null ? "p cnf 1 1\n1 0\n" : "p cnf 1 2\n1 0\n-1 0\n");
rep.resultCNF(out);
return null;
}
if (solver.options().solver()==SATFactory.ZChaff || !solver.options().solver().incremental()) {
rep.debug("Begin solve()\n");