mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 12:08:18 +00:00
Fixed justification
(justification may not contain consequence)
This commit is contained in:
parent
ed5ce1ce5f
commit
8855163ccf
|
@ -69,8 +69,8 @@ void PackedRow::get_reason(literal_vector& antecedents, const unsigned_vector& c
|
||||||
SASSERT((*this)[col] == 1);
|
SASSERT((*this)[col] == 1);
|
||||||
unsigned var = column_to_var[col];
|
unsigned var = column_to_var[col];
|
||||||
if (var == prop.var()) {
|
if (var == prop.var()) {
|
||||||
antecedents.push_back(prop);
|
// In Z3 we should not have the antecedents in the justification
|
||||||
std::swap(antecedents[0], antecedents.back());
|
//antecedents.push_back(prop);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
antecedents.push_back(literal(var, !tmp_col2[col]));
|
antecedents.push_back(literal(var, !tmp_col2[col]));
|
||||||
|
@ -373,7 +373,7 @@ std::ostream& EGaussian::display(std::ostream& out) const {
|
||||||
if (m_mat.num_rows() == 0)
|
if (m_mat.num_rows() == 0)
|
||||||
return out;
|
return out;
|
||||||
for (auto const& row : m_mat) {
|
for (auto const& row : m_mat) {
|
||||||
bool first = true;
|
bool first = true;
|
||||||
for (int i = 0; i < row.get_size() * 64; ++i) {
|
for (int i = 0; i < row.get_size() * 64; ++i) {
|
||||||
if (row[i]) {
|
if (row[i]) {
|
||||||
if (first)
|
if (first)
|
||||||
|
|
|
@ -127,7 +127,7 @@ namespace xr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void solver::asserted(sat::literal l) {
|
void solver::asserted(literal l) {
|
||||||
TRACE("xor", tout << "asserted: " << l << "\n";);
|
TRACE("xor", tout << "asserted: " << l << "\n";);
|
||||||
force_push();
|
force_push();
|
||||||
m_prop_queue.push_back(l);
|
m_prop_queue.push_back(l);
|
||||||
|
@ -699,7 +699,7 @@ namespace xr {
|
||||||
while (!m_interesting.empty()) {
|
while (!m_interesting.empty()) {
|
||||||
|
|
||||||
// Pop and check if it can be XOR-ed together
|
// Pop and check if it can be XOR-ed together
|
||||||
const unsigned v = m_interesting.back();
|
bool_var v = m_interesting.back();
|
||||||
m_interesting.pop_back();
|
m_interesting.pop_back();
|
||||||
if (m_occ_cnt[v] != 2)
|
if (m_occ_cnt[v] != 2)
|
||||||
continue;
|
continue;
|
||||||
|
@ -707,7 +707,7 @@ namespace xr {
|
||||||
unsigned indexes[2];
|
unsigned indexes[2];
|
||||||
unsigned at = 0;
|
unsigned at = 0;
|
||||||
unsigned_vector& ws = occurs[v];
|
unsigned_vector& ws = occurs[v];
|
||||||
for (unsigned i : ws)
|
for (bool_var i : ws)
|
||||||
if (!xors[i].empty())
|
if (!xors[i].empty())
|
||||||
indexes[at++] = i;
|
indexes[at++] = i;
|
||||||
SASSERT(at == 2);
|
SASSERT(at == 2);
|
||||||
|
|
Loading…
Reference in a new issue