1/*******************************************************************\
5Author: Daniel Kroening, kroening@kroening.com
7\*******************************************************************/
34 :
cnft(message_handler), out(_out)
46 // We start counting at 1, thus there is one variable fewer.
56 // The DIMACS CNF format allows line breaks in clauses:
57 // "Each clauses is terminated by the value 0. Unlike many formats
58 // that represent the end of a clause by a new-line character,
59 // this format allows clauses to be on multiple lines."
60 // Some historic solvers (zchaff e.g.) have silently swallowed
61 // literals in clauses that exceed some fixed buffer size.
63 // However, the SAT competition format does not allow line
64 // breaks in clauses, so we offer both options.
66 for(
size_t j=0; j<clause.size(); j++)
68 out << clause[j].dimacs() <<
" ";
69 // newline to avoid overflow in sat checkers
79 std::size_t count = 0;
81 for(clausest::const_iterator it=
clauses.begin();
86 // print the block once in a while
94 // make sure the final block is printed as well
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
virtual size_t no_variables() const override
dimacs_cnf_dumpt(std::ostream &_out, message_handlert &message_handler)
void lcnf(const bvt &bv) override
bool is_in_conflict(literalt l) const override
Returns true if an assumption is in the final conflict.
dimacs_cnft(message_handlert &)
void write_clauses(std::ostream &out) const
static void write_dimacs_clause(const bvt &, std::ostream &, bool break_lines)
void set_assignment(literalt a, bool value) override
virtual void write_dimacs_cnf(std::ostream &out) const
void write_problem_line(std::ostream &out) const
std::vector< literalt > bvt
Magic numbers used throughout the codebase.
const std::size_t CNF_DUMP_BLOCK_SIZE
#define UNREACHABLE
This should be used to mark dead code.