Skip to content

Creation of Boolean Variables as ZBDDs #22

@sirandreww

Description

@sirandreww

I'm working with ZDDs using this library and I'm noticing the following issue:

    let inner_node_capacity = 1 << 20;
    let apply_cache_capacity = 1 << 20;
    let threads = 1;

    let manager_ref: oxidd::zbdd::ZBDDManagerRef =
        oxidd::zbdd::new_manager(inner_node_capacity, apply_cache_capacity, threads);

    let a =
        manager_ref.with_manager_exclusive(|manager| ZBDDFunction::new_singleton(manager).unwrap());
    let b =
        manager_ref.with_manager_exclusive(|manager| ZBDDFunction::new_singleton(manager).unwrap());
    let x =
        manager_ref.with_manager_exclusive(|manager| ZBDDFunction::new_singleton(manager).unwrap());

    let def = a.and(&b).unwrap().equiv(&x).unwrap();

    let r = def.and(&x).unwrap().and(&a).unwrap();

    debug_assert!(r.satisfiable());

I'm defining 3 variables a, b, x and I'm defining x to be the result of a ^ b (x = a && b).
Then I'm checking the result of the SAT query x && a and it is not SAT? (The assert fails).
Am I somehow using the library incorrectly?

Version

oxidd = "0.7.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions