3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-22 00:26:38 +00:00

use member variable rather that static

This commit is contained in:
Jakob Rath 2022-01-20 17:09:36 +01:00
parent 64152c338d
commit b968898b7e
2 changed files with 5 additions and 4 deletions

View file

@ -192,10 +192,9 @@ namespace polysat {
void solver::propagate() {
if (!can_propagate())
return;
static bool propagating = false;
if (propagating)
if (m_propagating)
return;
propagating = true;
m_propagating = true;
push_qhead();
while (can_propagate()) {
auto const& item = m_search[m_qhead++];
@ -207,6 +206,7 @@ namespace polysat {
linear_propagate();
SASSERT(wlist_invariant());
SASSERT(assignment_invariant());
m_propagating = false;
}
/**

View file

@ -104,8 +104,9 @@ namespace polysat {
vector<justification> m_justification; // justification for variable assignment
vector<signed_constraints> m_pwatch; // watch list datastructure into constraints.
#ifndef NDEBUG
std::optional<pvar> m_locked_wlist; // restrict watch list modification while it is begin propagated
std::optional<pvar> m_locked_wlist; // restrict watch list modification while it is being propagated
#endif
bool m_propagating = false; // set to true during propagation
unsigned_vector m_activity;
vector<pdd> m_vars;