3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 20:05:51 +00:00

move drat functionality into euf

This commit is contained in:
Nikolaj Bjorner 2022-08-25 19:19:13 -07:00
parent 1ffbe23ee3
commit 458f417f44
4 changed files with 16 additions and 39 deletions

View file

@ -30,19 +30,27 @@ namespace euf {
}
void solver::def_add_arg(unsigned arg) {
get_drat().def_add_arg(arg);
auto* out = get_drat().out();
if (out)
(*out) << " " << arg;
}
void solver::def_end() {
get_drat().def_end();
auto* out = get_drat().out();
if (out)
(*out) << " 0\n";
}
void solver::def_begin(char id, unsigned n, std::string const& name) {
get_drat().def_begin(id, n, name);
auto* out = get_drat().out();
if (out)
(*out) << id << " " << n << " " << name;
}
void solver::bool_def(bool_var v, unsigned n) {
get_drat().bool_def(v, n);
auto* out = get_drat().out();
if (out)
(*out) << "b " << v << " " << n << " 0\n";
}

View file

@ -1430,10 +1430,9 @@ namespace pb {
IF_VERBOSE(0, verbose_stream() << *c << "\n");
VERIFY(c->well_formed());
if (m_solver && m_solver->get_config().m_drat) {
std::function<void(std::ostream& out)> fn = [&](std::ostream& out) {
out << "c ba constraint " << *c << " 0\n";
};
m_solver->get_drat().log_adhoc(fn);
auto * out = s().get_drat().out();
if (out)
*out << "c ba constraint " << *c << " 0\n";
}
}