88 std::getline(in, line);
90 if(!line.empty() && line[line.size() - 1] ==
'\r')
91 line.resize(line.size()-1);
93 if(line==
"The instance evaluates to TRUE.")
99 else if(line==
"The instance evaluates to FALSE.")
146 std::string options=
"-dump qbm=bdd";
156 std::string
key=
" [OK, VALID,";
162 std::getline(in, line);
164 if(!line.empty() && line[line.size() - 1] ==
'\r')
165 line.resize(line.size()-1);
167 if(line.compare(0,
key.size(),
key)==0)
194 std::string
key=
"# existentials[";
197 std::getline(in, line);
200 line ==
"# QBM file, 1.3",
201 "QBM file has to start with this exact string: ",
206 std::getline(in, line);
208 if(!line.empty() && line[line.size() - 1] ==
'\r')
209 line.resize(line.size()-1);
211 if(line.compare(0,
key.size(),
key)==0)
218 size_t ob=line.find(
'[');
219 std::string
n_es=line.substr(
ob+1, line.find(
']')-
ob-1);
221 INVARIANT(
n_e != 0,
"there has to be at least one existential variable");
224 std::string
e_lists=line.substr(line.find(
':')+2);
226 for(
int i=0; i<
n_e; i++)
231 INVARIANT(cur != 0,
"variable numbering starts with 1");
240 INVARIANT(result,
"existential mapping from sKizzo missing");
246 "sed -e \"s/^#.*$/# no comment/\" -i "+
qbf_tmp_file+
".qbm").c_str());
277 "valid QBM certificate should have twice as much roots as the "
278 "existential variables");
282 for(
unsigned i=0; i<
e_list.size(); i++)
295 for(
int i=0; i<
nroots; i++)
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
size_t no_clauses() const override
virtual size_t no_variables() const override
mstreamt & status() const
bool get_certificate(void)
resultt prop_solve() override
std::string solver_text() const override
bool is_in_core(literalt l) const override
modeltypet m_get(literalt a) const override
~qbf_skizzo_coret() override
virtual void write_qdimacs_cnf(std::ostream &out)
#define INVARIANT_WITH_DIAGNOSTICS(CONDITION, REASON,...)
Same as invariant, with one or more diagnostics attached Diagnostics can be of any type that has a sp...
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
int snprintf(char *str, size_t size, const char *fmt,...)
int unsafe_string2int(const std::string &str, int base)