vitri 0.2.0

CNF preprocessing and vtree construction (variable trees) for circuit compilation and model counting: preprocesses a DIMACS CNF, records the arithmetic to lift a model count back to the original, and builds a good vtree for it — for any d-DNNF/SDD/TDD compiler, or any model counter that takes a vtree.
Documentation
1
2
3
4
5
6
7
8
9
use super::multilevel_bisect;

#[test]
fn an_invalid_graph_imbalance_returns_the_backend_error() {
    let graph = goatd::Graph::new(3, [(0, 1), (1, 2)]);
    let error = multilevel_bisect(&graph, 0.51, 0).expect_err("the imbalance exceeds one half");

    assert!(error.contains("imbalance") && error.contains("0.0..=0.5"));
}