mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 17:45:32 +00:00
fix build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
f72e30e539
commit
af2376e9e4
4 changed files with 10 additions and 15 deletions
|
@ -2,6 +2,7 @@ z3_add_component(polysat
|
|||
SOURCES
|
||||
constraint.cpp
|
||||
eq_constraint.cpp
|
||||
bit_constraint.cpp
|
||||
justification.cpp
|
||||
log.cpp
|
||||
solver.cpp
|
||||
|
|
|
@ -13,14 +13,14 @@ Author:
|
|||
--*/
|
||||
|
||||
#include "math/polysat/bit_constraint.h"
|
||||
#include "math/polysat/solver.h"
|
||||
|
||||
namespace polysat {
|
||||
|
||||
std::ostream& bit_constraint::display(std::ostream& out) const {
|
||||
if (!m_value)
|
||||
out << "~";
|
||||
out << "v" << m_var << "[" << m_index << "] ";
|
||||
}
|
||||
if (!m_value)
|
||||
out << "~";
|
||||
out << "v" << m_var << "[" << m_index << "] ";
|
||||
return out;
|
||||
}
|
||||
|
||||
|
@ -39,19 +39,11 @@ namespace polysat {
|
|||
}
|
||||
|
||||
bool bit_constraint::is_currently_false(solver& s) {
|
||||
return false;
|
||||
return m_viable[m_var].is_false();
|
||||
}
|
||||
|
||||
void bit_constraint::narrow(solver& s) {
|
||||
bdd viable = s.m_bdd.mk_true();
|
||||
if (m_value)
|
||||
viable &= s.m_bdd.mk_var(m_index);
|
||||
else
|
||||
viable &= s.m_bdd.mk_nvar(m_index);
|
||||
s.push_viable(v);
|
||||
s.m_viable[v] &= viable;
|
||||
if (s.m_viable[v].is_false())
|
||||
s.set_conflict(v);
|
||||
s.intersect_viable(m_var, m_value ? s.m_bdd.mk_var(m_index) : s.m_bdd.mk_nvar(m_index));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -43,12 +43,13 @@ namespace polysat {
|
|||
void solver::intersect_viable(pvar v, bdd vals) {
|
||||
push_viable(v);
|
||||
m_viable[v] &= vals;
|
||||
if (m_viable[v].is_false())
|
||||
set_conflict(v);
|
||||
}
|
||||
|
||||
dd::find_int_t solver::find_viable(pvar v, rational & val) {
|
||||
return m_viable[v].find_int(size(v), val);
|
||||
}
|
||||
|
||||
|
||||
solver::solver(reslimit& lim):
|
||||
m_lim(lim),
|
||||
|
|
|
@ -37,6 +37,7 @@ namespace polysat {
|
|||
};
|
||||
|
||||
friend class eq_constraint;
|
||||
friend class bit_constraint;
|
||||
|
||||
typedef ptr_vector<constraint> constraints;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue