21 if(filename.empty() || filename==
"-")
24 std::ofstream out(filename);
28 error() <<
"failed to open " << filename <<
eom;
42 if(s.second.is_constant())
43 out <<
"c " << s.first <<
" " 44 << (s.second.is_true()?
"TRUE":
"FALSE") <<
"\n";
46 out <<
"c " << s.first <<
" " 47 << s.second.dimacs() <<
"\n";
51 for(
const auto &m :
get_map().mapping)
55 if(literal_map.empty())
58 out <<
"c " << m.first;
60 for(
const auto &lit : literal_map)
63 else if(lit.l.is_constant())
64 out <<
" " << (lit.l.is_true()?
"TRUE":
"FALSE");
66 out <<
" " << lit.l.dimacs();
const symbolst & get_symbols() const
static mstreamt & eom(mstreamt &m)
bool write_dimacs(const std::string &filename)
std::vector< map_bitt > literal_mapt
const boolbv_mapt & get_map() const