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

use vectors instead of hash-tables in dimacs serialization to avoid hash-table contention

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-01-12 11:05:00 -08:00
parent e623f1e9c9
commit e4d6aa07dc
3 changed files with 26 additions and 14 deletions

View file

@ -332,10 +332,17 @@ namespace sat {
}
void drat::verify(unsigned n, literal const* c) {
if (m_check_unsat && !is_drup(n, c) && !is_drat(n, c)) {
if (!m_check_unsat) {
return;
}
for (unsigned i = 0; i < n; ++i) {
declare(c[i]);
}
if (!is_drup(n, c) && !is_drat(n, c)) {
literal_vector lits(n, c);
std::cout << "Verification of " << lits << " failed\n";
s.display(std::cout);
SASSERT(false);
exit(0);
UNREACHABLE();
//display(std::cout);
@ -476,6 +483,10 @@ namespace sat {
literal lit = c[i];
if (lit != wc.m_l1 && lit != wc.m_l2 && value(lit) != l_false) {
wc.m_l2 = lit;
if (m_watches.size() <= (~lit).index())
{
IF_VERBOSE(0, verbose_stream() << m_watches.size() << " " << lit << " " << (~lit).index() << "\n");
}
m_watches[(~lit).index()].push_back(idx);
done = true;
}