3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-04-27 14:23:35 +00:00

minor changes

This commit is contained in:
Jakob Rath 2024-02-08 15:25:00 +01:00
parent 705203ea4c
commit 3eb42cdf4b
6 changed files with 8 additions and 11 deletions

View file

@ -1,4 +1,4 @@
/*++
/*++
Copyright (c) 2021 Microsoft Corporation
Module Name:
@ -131,7 +131,7 @@ namespace polysat {
if (l.lo().val() == 0)
val = 0;
else
val = l.manager().max_value() + 1 - l.lo().val();
val = l.manager().two_to_N() - l.lo().val();
return true;
}

View file

@ -146,7 +146,7 @@ namespace polysat {
/*
* Add a named clause. Dependencies are assumed, signed constraints are guaranteeed.
* Add a named clause. Dependencies are assumed, signed constraints are guaranteed.
* In other words, the clause represents the formula /\ d_i -> \/ sc_j
* Where d_i are logical interpretations of dependencies and sc_j are signed constraints.
*/

View file

@ -175,7 +175,6 @@ namespace polysat {
// 3. now the reference returned from lhs.offset() may be invalid
pdd const rhs_plus_one = rhs + 1;
// TODO: potential bug here: first call offset(), then rhs+1 has to reallocate pdd_manager::m_values, then the reference to offset is broken.
if (rhs.is_val() && !rhs.is_zero() && lhs.offset() == rhs_plus_one.val()) {
TRACE("bv", tout << "p - k <= -k - 1 --> k <= p\n");
pdd k = -(rhs + 1);