mirror of
https://github.com/Z3Prover/z3
synced 2025-08-24 03:57:51 +00:00
tidy, initial polysat
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
82bc6474a3
commit
fc60690742
8 changed files with 496 additions and 32 deletions
|
@ -339,7 +339,7 @@ public:
|
|||
bddv const& x = x_dom.var();
|
||||
|
||||
vector<bdd> num;
|
||||
for (unsigned n = 0; n < (1 << x_dom.num_bits()); ++n) {
|
||||
for (unsigned n = 0; n < (1ul << x_dom.num_bits()); ++n) {
|
||||
num.push_back(x == rational(n));
|
||||
SASSERT(x_dom.contains(num[n], rational(n)));
|
||||
rational r;
|
||||
|
@ -359,7 +359,7 @@ public:
|
|||
SASSERT(old_levels != m.m_var2level); // ensure that reorder actually did something.
|
||||
|
||||
// Should still give the correct answer after reordering
|
||||
for (unsigned n = 0; n < (1 << x_dom.num_bits()); ++n) {
|
||||
for (unsigned n = 0; n < (1ul << x_dom.num_bits()); ++n) {
|
||||
SASSERT(x_dom.contains(num[n], rational(n)));
|
||||
rational r;
|
||||
SASSERT_EQ(x_dom.find(num[n], r), find_t::singleton);
|
||||
|
|
|
@ -148,7 +148,7 @@ namespace polysat {
|
|||
*/
|
||||
static void test_monot1() {
|
||||
scoped_solver s;
|
||||
auto bw = 5;
|
||||
auto bw = 5;
|
||||
|
||||
auto tb1 = s.var(s.add_var(bw));
|
||||
auto tb2 = s.var(s.add_var(bw));
|
||||
|
@ -179,13 +179,13 @@ namespace polysat {
|
|||
|
||||
s.add_eq(elastic1 + a - elastic2);
|
||||
|
||||
// tb2 = ((v * base2) / elastic2);
|
||||
// tb2 = ((v * base2) / elastic2);
|
||||
s.add_eq((tb2 * elastic2) + rem3 - (v * base2));
|
||||
|
||||
// quot4 = v / (elastic1 + a);
|
||||
s.add_eq((quot4 * (elastic1 + a)) + rem4 - v);
|
||||
// quot4 = v / (elastic1 + a);
|
||||
s.add_eq((quot4 * (elastic1 + a)) + rem4 - v);
|
||||
|
||||
s.add_eq(quot4 + 1 - err);
|
||||
s.add_eq(quot4 + 1 - err);
|
||||
|
||||
s.add_ult(tb1, tb2);
|
||||
s.check();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue