3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-15 13:28:47 +00:00

include 'stopwatch.h' to avoid ODR warnings, #994

This commit is contained in:
Nikolaj Bjorner 2017-04-30 11:26:54 -07:00
parent 4468816d32
commit aff02ca905
4 changed files with 18 additions and 3 deletions

View file

@ -29,6 +29,7 @@ Revision History:
#include"substitution.h" #include"substitution.h"
#include"ast_counter.h" #include"ast_counter.h"
#include"statistics.h" #include"statistics.h"
#include"stopwatch.h"
#include"lbool.h" #include"lbool.h"
namespace datalog { namespace datalog {

View file

@ -30,7 +30,6 @@ Revision History:
namespace datalog { namespace datalog {
class execution_context;
class instruction_block; class instruction_block;
class rel_context; class rel_context;

View file

@ -3500,7 +3500,13 @@ static void back_remove(sat::literal_vector& lits, sat::literal l) {
} }
bool solver::check_domain(literal lit, literal lit2) { bool solver::check_domain(literal lit, literal lit2) {
return m_antecedents.contains(lit2.var()); if (!m_antecedents.contains(lit2.var())) {
m_todo_antecedents.push_back(lit2);
return false;
}
else {
return true;
}
} }
bool solver::extract_assumptions(literal lit, index_set& s) { bool solver::extract_assumptions(literal lit, index_set& s) {
@ -3565,8 +3571,16 @@ static void back_remove(sat::literal_vector& lits, sat::literal l) {
s.insert(lit.index()); s.insert(lit.index());
} }
else { else {
SASSERT(m_todo_antecedents.empty());
if (!extract_assumptions(lit, s)) { if (!extract_assumptions(lit, s)) {
return false; SASSERT(!m_todo_antecedents.empty());
while (!m_todo_antecedents.empty()) {
index_set s1;
if (extract_assumptions(m_todo_antecedents.back(), s1)) {
m_todo_antecedents.pop_back();
}
}
VERIFY (extract_assumptions(lit, s));
} }
add_assumption(lit); add_assumption(lit);
} }

View file

@ -481,6 +481,7 @@ namespace sat {
typedef hashtable<unsigned, u_hash, u_eq> index_set; typedef hashtable<unsigned, u_hash, u_eq> index_set;
u_map<index_set> m_antecedents; u_map<index_set> m_antecedents;
literal_vector m_todo_antecedents;
vector<literal_vector> m_binary_clause_graph; vector<literal_vector> m_binary_clause_graph;
bool extract_assumptions(literal lit, index_set& s); bool extract_assumptions(literal lit, index_set& s);