1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
use bitvec::prelude::*;
use obddimal::bdd_manager::hash_select::HashMap;
use rand::Rng;
/// This prints the one-columns of a random truth table with 8 variables,
/// for testcase generation. The result is to be used in src/bdd_manager/test.rs.
fn main() {
let mut truthtable: HashMap<u8, bool> = Default::default();
let mut rng = rand::thread_rng();
for i in 0u8..=255u8 {
let f: bool = rng.gen();
truthtable.insert(i, f);
}
for (k, v) in truthtable {
if v {
println!("{},", k.view_bits::<Lsb0>())
}
}
}