mirror of
https://github.com/Z3Prover/z3
synced 2026-03-19 11:33:09 +00:00
add built-in support for bvor: the rewriter converts bitwise and to bit-wise or so using bvor as a basis makes better sense
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
e2c5d7d358
commit
e7c9c5f7a2
10 changed files with 279 additions and 137 deletions
|
|
@ -51,6 +51,8 @@ namespace polysat {
|
|||
resolve(v, inequality::from_ule(c, id));
|
||||
else if (sc.is_umul_ovfl())
|
||||
try_umul_ovfl(v, umul_ovfl(id, sc));
|
||||
else if (sc.is_op())
|
||||
try_op(v, sc, c.get_dependency(id));
|
||||
|
||||
return c.inconsistent();
|
||||
}
|
||||
|
|
@ -238,4 +240,16 @@ namespace polysat {
|
|||
add_clause("ax + b = 0 & cx + d = 0 ==> cb - da = 0", { i.dep(), j.dep(), C.eq(r) }, true);
|
||||
}
|
||||
|
||||
|
||||
void saturation::try_op(pvar v, signed_constraint& sc, dependency const& d) {
|
||||
verbose_stream() << "try op " << sc << "\n";
|
||||
SASSERT(sc.is_op());
|
||||
sc.propagate(c, l_true, d);
|
||||
}
|
||||
|
||||
// possible algebraic rule:
|
||||
// From "Hacker's Delight", section 2-2. Addition Combined with Logical Operations;
|
||||
// found via Int-Blasting paper; see https://doi.org/10.1007/978-3-030-94583-1_24
|
||||
// bor(p,q) = (p + q) - band(p, q);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue