3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-15 05:18:44 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-03-31 21:00:52 -07:00
parent ddc77b1100
commit 1d6fb6352f

View file

@ -2076,12 +2076,20 @@ namespace sat {
else
polarity = polarity ^ sign;
}
if (lits.empty()) {
throw default_exception("empty xor is TBD");
}
if (polarity) {
if (polarity && !lits.empty()) {
lits[0].neg();
}
switch (lits.size()) {
case 0:
if (polarity)
s().set_conflict(justification(0));
return nullptr;
case 1:
s().assign_scoped(lits[0]);
return nullptr;
default:
break;
}
void * mem = m_allocator.allocate(xr::get_obj_size(lits.size()));
xr* x = new (mem) xr(next_id(), lits);
x->set_learned(learned);