mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
another unit test for Nuno
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
2bf0b5f33f
commit
f3d2535b46
3 changed files with 32 additions and 2 deletions
|
@ -146,6 +146,8 @@ public:
|
|||
|
||||
test_filter_neg4(false);
|
||||
test_filter_neg4(true);
|
||||
test_filter_neg6(false);
|
||||
test_filter_neg6(true);
|
||||
|
||||
test_filter_neg();
|
||||
test_filter_neg2();
|
||||
|
@ -658,6 +660,35 @@ public:
|
|||
neg->deallocate();
|
||||
}
|
||||
|
||||
void test_filter_neg5(bool disable_fast) {
|
||||
relation_signature sig1, sig2;
|
||||
sig1.push_back(bv.mk_sort(2));
|
||||
sig1.push_back(bv.mk_sort(2));
|
||||
sig2.push_back(bv.mk_sort(2));
|
||||
sig2.push_back(bv.mk_sort(2));
|
||||
sig2.push_back(bv.mk_sort(2));
|
||||
unsigned_vector cols1, cols2, cols3;
|
||||
|
||||
cols1.push_back(0);
|
||||
cols1.push_back(1);
|
||||
cols2.push_back(0);
|
||||
cols2.push_back(2);
|
||||
cols3.push_back(0);
|
||||
cols3.push_back(1);
|
||||
cols3.push_back(2);
|
||||
udoc_relation* tgt = mk_full(sig1);
|
||||
udoc_relation* neg = mk_full(sig2);
|
||||
rel_mut filter_id = p.mk_filter_identical_fn(*tgt, cols3.size(), cols3.c_ptr());
|
||||
(*filter_id)(*tgt);
|
||||
if (disable_fast) p.disable_fast_pass();
|
||||
apply_filter_neg(*tgt, *neg, cols1, cols2);
|
||||
tgt->deallocate();
|
||||
neg->deallocate();
|
||||
}
|
||||
|
||||
// TBD: unit test to expose similar bug as projection had.
|
||||
// you can't just remove columns when there are side-constraints in neg.
|
||||
|
||||
void set_random(udoc_relation& r, unsigned num_vals) {
|
||||
unsigned num_bits = r.get_dm().num_tbits();
|
||||
udoc_relation* full = mk_full(r.get_signature());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue