mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
DoC: fix slow path of filter_by_negation when columns are repeated in tgt relation
Signed-off-by: Nuno Lopes <a-nlopes@microsoft.com>
This commit is contained in:
parent
bb15ddbf15
commit
9828b26379
3 changed files with 53 additions and 8 deletions
|
@ -149,6 +149,7 @@ public:
|
|||
test_rename();
|
||||
test_filter_neg();
|
||||
test_filter_neg2();
|
||||
test_filter_neg3();
|
||||
|
||||
|
||||
// empty
|
||||
|
@ -601,6 +602,39 @@ public:
|
|||
t2->deallocate();
|
||||
}
|
||||
|
||||
void test_filter_neg3() {
|
||||
// filter_by_negation
|
||||
relation_signature sig;
|
||||
sig.push_back(bv.mk_sort(1));
|
||||
sig.push_back(bv.mk_sort(1));
|
||||
sig.push_back(bv.mk_sort(1));
|
||||
unsigned_vector cols1, cols2;
|
||||
|
||||
cols1.push_back(0);
|
||||
cols1.push_back(0);
|
||||
cols2.push_back(0);
|
||||
cols2.push_back(1);
|
||||
|
||||
/// 1xx
|
||||
udoc_relation* t1 = mk_full(sig);
|
||||
{
|
||||
doc& d = t1->get_udoc()[0];
|
||||
t1->get_dm().set(d, 0, BIT_1);
|
||||
}
|
||||
|
||||
/// 10x
|
||||
udoc_relation* t2 = mk_full(sig);
|
||||
{
|
||||
doc& d = t2->get_udoc()[0];
|
||||
t1->get_dm().set(d, 0, BIT_1);
|
||||
t1->get_dm().set(d, 1, BIT_0);
|
||||
}
|
||||
|
||||
apply_filter_neg(*t1, *t2, cols1, cols2);
|
||||
t1->deallocate();
|
||||
t2->deallocate();
|
||||
}
|
||||
|
||||
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