3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-22 11:07:51 +00:00

fix drat for lookahead, fixes for binary drat format

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-01-31 14:58:51 -08:00
parent cda78d8d0b
commit 1e90be62bc
4 changed files with 21 additions and 18 deletions

View file

@ -43,6 +43,8 @@ namespace sat {
}
drat::~drat() {
if (m_out) m_out->flush();
if (m_bout) m_bout->flush();
dealloc(m_out);
dealloc(m_bout);
for (unsigned i = 0; i < m_proof.size(); ++i) {
@ -83,8 +85,8 @@ namespace sat {
void drat::bdump(unsigned n, literal const* c, status st) {
unsigned char ch = 0;
switch (st) {
case status::asserted: UNREACHABLE(); return;
case status::external: UNREACHABLE(); return; // requires extension to drat format.
case status::asserted: return;
case status::external: return;
case status::learned: ch = 'a'; break;
case status::deleted: ch = 'd'; break;
default: UNREACHABLE(); break;
@ -104,7 +106,7 @@ namespace sat {
while (v);
}
ch = 0;
(*m_bout) << 0;
(*m_bout) << ch;
}
bool drat::is_cleaned(clause& c) const {
@ -615,8 +617,7 @@ namespace sat {
literal ls[2] = {l1, l2};
if (m_out) dump(2, ls, status::deleted);
if (m_bout) bdump(2, ls, status::deleted);
if (m_check)
append(l1, l2, status::deleted);
if (m_check) append(l1, l2, status::deleted);
}
void drat::del(clause& c) {