1 #ifndef BM3VL__H__INCLUDED__
2 #define BM3VL__H__INCLUDED__
56 bv_value.bit_and(bv_null);
73 bool b_notnull = bv_null.test(idx);
77 bool b_val = bv_value.test(idx);
97 typename BV::size_type idx,
int val)
103 bv_value.clear_bit(idx);
107 is_set = bv_null.set_bit_and(idx,
false);
109 bv_value.clear_bit(idx);
137 bv_value.bit_xor(bv_null);
152 const BV& bv_value2,
const BV& bv_null2)
154 BV bv_known_false1, bv_known_false2;
155 bv_known_false1.bit_xor(bv_value1, bv_null1, BV::opt_none);
156 bv_known_false2.bit_xor(bv_value2, bv_null2, BV::opt_none);
158 bv_known_false1.bit_sub(bv_null2);
159 bv_known_false2.bit_sub(bv_null1);
161 bv_value1.bit_or(bv_value2);
162 bv_null1.bit_or(bv_null2);
164 bv_null1.bit_sub(bv_known_false1);
165 bv_null1.bit_sub(bv_known_false2);
182 const BV& bv_value1,
const BV& bv_null1,
183 const BV& bv_value2,
const BV& bv_null2)
185 BV bv_known_false1, bv_known_false2;
186 bv_known_false1.bit_xor(bv_value1, bv_null1, BV::opt_none);
187 bv_known_false2.bit_xor(bv_value2, bv_null2, BV::opt_none);
189 bv_known_false1.bit_sub(bv_null2);
190 bv_known_false2.bit_sub(bv_null1);
192 bv_value_target.bit_or(bv_value1, bv_value2, BV::opt_none);
193 bv_null_target.bit_or(bv_null1, bv_null2, BV::opt_none);
196 bv_null_target.bit_sub(bv_known_false1);
197 bv_null_target.bit_sub(bv_known_false2);
214 const BV& bv_value2,
const BV& bv_null2)
217 bv_ambig_null1.bit_xor(bv_null1, bv_null2, BV::opt_none);
219 BV bv_ambig_null2(bv_ambig_null1);
221 bv_ambig_null1.bit_and(bv_value1);
222 bv_ambig_null2.bit_and(bv_value2);
224 bv_value1.bit_and(bv_value2);
226 bv_null1.bit_or(bv_null2);
228 bv_null1.bit_sub(bv_ambig_null1);
229 bv_null1.bit_sub(bv_ambig_null2);
246 const BV& bv_value1,
const BV& bv_null1,
247 const BV& bv_value2,
const BV& bv_null2)
250 bv_ambig_null1.bit_xor(bv_null1, bv_null2, BV::opt_none);
252 BV bv_ambig_null2(bv_ambig_null1);
254 bv_ambig_null1.bit_and(bv_value1);
255 bv_ambig_null2.bit_and(bv_value2);
257 bv_value_target.bit_and(bv_value1, bv_value2, BV::opt_none);
258 bv_null_target.bit_or(bv_null1, bv_null2, BV::opt_none);
260 bv_null_target.bit_sub(bv_ambig_null1);
261 bv_null_target.bit_sub(bv_ambig_null2);
Compressed bit-vector bvector<> container, set algebraic methods, traversal iterators.
void invert_kleene(BV &bv_value, const BV &bv_null)
Kleene NEG operation.
int get_value_kleene(const BV &bv_value, const BV &bv_null, typename BV::size_type idx) noexcept
Return Kleene logic value based on value and known vectors.
void init_kleene(BV &bv_value, const BV &bv_null)
Initialized the value bit-vector so that it always returns 0 (false) for the unknown.
void and_kleene(BV &bv_value1, BV &bv_null1, const BV &bv_value2, const BV &bv_null2)
Kleene AND(vect1, vect2) (vect1 &= vect2) 0 AND Unk = 0 (known)
void set_value_kleene(BV &bv_value, BV &bv_null, typename BV::size_type idx, int val)
Set Kleene logic value based on value and known vectors.
int or_values_kleene(int a, int b) noexcept
Reference function for Kleene logic OR (for verification and testing)
int and_values_kleene(int a, int b) noexcept
Reference function for Kleene logic AND (for verification and testing)
void or_kleene(BV &bv_value1, BV &bv_null1, const BV &bv_value2, const BV &bv_null2)
Kleene OR(vect1, vect2) (vect1 |= vect2) 1 OR Unk = 1 (known)