Struct CompressionSddBuilder

Source
pub struct CompressionSddBuilder<'a> { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl<'a> SddBuilder<'a> for CompressionSddBuilder<'a>

Source§

fn compress(&'a self, node: &mut Vec<SddAnd<'a>>)

Canonicalizes the list of (prime, sub) terms in-place node: a list of (prime, sub) pairs

Source§

fn canonicalize( &'a self, node: Vec<SddAnd<'a>>, table: VTreeIndex, ) -> SddPtr<'a>

Returns a canonicalized SDD pointer from a list of (prime, sub) pairs

Source§

fn vtree_manager(&self) -> &VTreeManager

Source§

fn app_cache_get(&self, and: &SddAnd<'a>) -> Option<SddPtr<'a>>

Source§

fn app_cache_insert(&self, and: SddAnd<'a>, ptr: SddPtr<'a>)

Source§

fn ite_cache_hash(&self, ite: &Ite<SddPtr<'_>>) -> u64

Source§

fn ite_cache_get(&self, ite: Ite<SddPtr<'a>>, hash: u64) -> Option<SddPtr<'_>>

Source§

fn ite_cache_insert(&self, ite: Ite<SddPtr<'a>>, res: SddPtr<'a>, hash: u64)

Source§

fn get_or_insert_bdd(&'a self, bdd: BinarySDD<'a>) -> SddPtr<'a>

Source§

fn get_or_insert_sdd(&'a self, or: SddOr<'a>) -> SddPtr<'a>

Source§

fn sdd_eq(&'a self, a: SddPtr<'a>, b: SddPtr<'a>) -> bool

Source§

fn set_compression(&mut self, b: bool)

Source§

fn node_iter(&self) -> Vec<SddPtr<'_>>

Source§

fn stats(&self) -> SddBuilderStats

Source§

fn log_recursive_call(&self)

Source§

fn is_true(&'a self, a: SddPtr<'a>) -> bool

Source§

fn is_false(&'a self, a: SddPtr<'a>) -> bool

Source§

fn unique_or(&'a self, node: Vec<SddAnd<'a>>, table: VTreeIndex) -> SddPtr<'a>

Source§

fn unique_bdd(&'a self, bdd: BinarySDD<'a>) -> SddPtr<'a>

Source§

fn and_indep( &'a self, a: SddPtr<'a>, b: SddPtr<'a>, lca: VTreeIndex, ) -> SddPtr<'a>

conjoin two SDDs that are in independent vtrees a is prime to b
Source§

fn and_sub_desc(&'a self, r: SddPtr<'a>, d: SddPtr<'a>) -> SddPtr<'a>

conjoin SDDs where d is a descendent of r, and d is sub to r i.e. for vtree 3 1 5 0 2 4 6 r might be wrt. node 3, and d wrt. node 5
Source§

fn and_prime_desc(&'a self, r: SddPtr<'a>, d: SddPtr<'a>) -> SddPtr<'a>

conjoin SDDs where d is a descendent of r, and r is sub to d i.e. for vtree 3 1 5 0 2 4 6 r might be wrt. node 3, and d wrt. node 1
Source§

fn and_cartesian( &'a self, a: SddPtr<'a>, b: SddPtr<'a>, lca: VTreeIndex, ) -> SddPtr<'a>

conjoin SDDs where a and b are wrt. the same vtree node
Source§

fn num_vars(&self) -> usize

Source§

fn vtree(&self, ptr: SddPtr<'_>) -> &VTree

Source§

fn vtree_index(&self, ptr: SddPtr<'_>) -> VTreeIndex

Source§

fn compile_cnf_helper(&'a self, vec: &[SddPtr<'a>]) -> Option<SddPtr<'a>>

Source§

fn print_sdd(&'a self, ptr: SddPtr<'a>) -> String

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<'a, T> BottomUpBuilder<'a, SddPtr<'a>> for T
where T: SddBuilder<'a>,

Source§

fn condition(&'a self, f: SddPtr<'a>, lbl: VarLabel, value: bool) -> SddPtr<'a>

Computes f | var = value TODO: This is highly inefficient, will re-traverse nodes, needs a cache TODO : this can bail out early by checking the vtree

Source§

fn ite(&'a self, f: SddPtr<'a>, g: SddPtr<'a>, h: SddPtr<'a>) -> SddPtr<'a>

Computes the SDD representing the logical function if f then g else h

Source§

fn iff(&'a self, f: SddPtr<'a>, g: SddPtr<'a>) -> SddPtr<'a>

Computes the SDD representing the logical function f <=> g

Source§

fn xor(&'a self, f: SddPtr<'a>, g: SddPtr<'a>) -> SddPtr<'a>

Computes the SDD representing the logical function f xor g

Source§

fn exists(&'a self, sdd: SddPtr<'a>, lbl: VarLabel) -> SddPtr<'a>

Existentially quantifies out the variable lbl from f

Source§

fn compile_cnf(&'a self, cnf: &Cnf) -> SddPtr<'a>

compile an SDD from an input CNF

Source§

fn true_ptr(&self) -> SddPtr<'a>

Source§

fn false_ptr(&self) -> SddPtr<'a>

Source§

fn var(&'a self, label: VarLabel, polarity: bool) -> SddPtr<'a>

Source§

fn negate(&'a self, f: SddPtr<'a>) -> SddPtr<'a>

Source§

fn eq(&'a self, a: SddPtr<'a>, b: SddPtr<'a>) -> bool

Test for semantic equality (not pointer/structural equality)
Source§

fn and(&'a self, a: SddPtr<'a>, b: SddPtr<'a>) -> SddPtr<'a>

Source§

fn or(&'a self, a: Ptr, b: Ptr) -> Ptr

Compute the Boolean function f || g by default, or is defined using de morgan’s law as and
Source§

fn compose(&'a self, f: Ptr, lbl: VarLabel, g: Ptr) -> Ptr

compose g into f for variable v I.e., computes the logical function (exists v. (g <=> v) /\ f).
Source§

fn compile_logical_expr(&'a self, expr: &LogicalExpr) -> Ptr

directly compile a logical expression
Source§

fn compile_plan(&'a self, expr: &BottomUpPlan) -> Ptr

Compiles from a BottomUpPlan, which represents a deferred computation
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V