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

adding drat forward checking

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-02-03 22:41:40 -08:00
parent 61341b8879
commit 5f70e4823d
3 changed files with 304 additions and 39 deletions

View file

@ -207,7 +207,9 @@ namespace sat {
if (m_config.m_drat) {
m_drat.del(c);
}
m_cls_allocator.del_clause(&c);
else if (!m_config.m_drat || !m_config.m_drat_check) {
m_cls_allocator.del_clause(&c);
}
m_stats.m_del_clause++;
}
@ -276,13 +278,12 @@ namespace sat {
clause * solver::mk_ter_clause(literal * lits, bool learned) {
if (m_config.m_drat)
m_drat.add(lits[0], lits[1], lits[2], learned);
m_stats.m_mk_ter_clause++;
clause * r = m_cls_allocator.mk_clause(3, lits, learned);
bool reinit = attach_ter_clause(*r);
if (reinit && !learned) push_reinit_stack(*r);
if (m_config.m_drat) m_drat.add(*r, learned);
if (learned)
m_learned.push_back(r);
else
@ -494,6 +495,7 @@ namespace sat {
void solver::dettach_bin_clause(literal l1, literal l2, bool learned) {
get_wlist(~l1).erase(watched(l2, learned));
get_wlist(~l2).erase(watched(l1, learned));
if (m_config.m_drat) m_drat.del(l1, l2);
}
void solver::dettach_clause(clause & c) {