pub struct CompressionSddBuilder<'a> { /* private fields */ }
Implementations§
Source§impl<'a> CompressionSddBuilder<'a>
impl<'a> CompressionSddBuilder<'a>
pub fn new(vtree: VTree) -> CompressionSddBuilder<'a>
Trait Implementations§
Source§impl<'a> SddBuilder<'a> for CompressionSddBuilder<'a>
impl<'a> SddBuilder<'a> for CompressionSddBuilder<'a>
Source§fn compress(&'a self, node: &mut Vec<SddAnd<'a>>)
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>
fn canonicalize( &'a self, node: Vec<SddAnd<'a>>, table: VTreeIndex, ) -> SddPtr<'a>
Returns a canonicalized SDD pointer from a list of (prime, sub) pairs
fn vtree_manager(&self) -> &VTreeManager
fn app_cache_get(&self, and: &SddAnd<'a>) -> Option<SddPtr<'a>>
fn app_cache_insert(&self, and: SddAnd<'a>, ptr: SddPtr<'a>)
fn ite_cache_hash(&self, ite: &Ite<SddPtr<'_>>) -> u64
fn ite_cache_get(&self, ite: Ite<SddPtr<'a>>, hash: u64) -> Option<SddPtr<'_>>
fn ite_cache_insert(&self, ite: Ite<SddPtr<'a>>, res: SddPtr<'a>, hash: u64)
fn get_or_insert_bdd(&'a self, bdd: BinarySDD<'a>) -> SddPtr<'a>
fn get_or_insert_sdd(&'a self, or: SddOr<'a>) -> SddPtr<'a>
fn sdd_eq(&'a self, a: SddPtr<'a>, b: SddPtr<'a>) -> bool
fn set_compression(&mut self, b: bool)
fn node_iter(&self) -> Vec<SddPtr<'_>>
fn stats(&self) -> SddBuilderStats
fn log_recursive_call(&self)
fn is_true(&'a self, a: SddPtr<'a>) -> bool
fn is_false(&'a self, a: SddPtr<'a>) -> bool
fn unique_or(&'a self, node: Vec<SddAnd<'a>>, table: VTreeIndex) -> SddPtr<'a>
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>
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>
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 5Source§fn and_prime_desc(&'a self, r: SddPtr<'a>, d: SddPtr<'a>) -> SddPtr<'a>
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 1Source§fn and_cartesian(
&'a self,
a: SddPtr<'a>,
b: SddPtr<'a>,
lca: VTreeIndex,
) -> SddPtr<'a>
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 nodefn num_vars(&self) -> usize
fn vtree(&self, ptr: SddPtr<'_>) -> &VTree
fn vtree_index(&self, ptr: SddPtr<'_>) -> VTreeIndex
fn compile_cnf_helper(&'a self, vec: &[SddPtr<'a>]) -> Option<SddPtr<'a>>
fn print_sdd(&'a self, ptr: SddPtr<'a>) -> String
Auto Trait Implementations§
impl<'a> !Freeze for CompressionSddBuilder<'a>
impl<'a> !RefUnwindSafe for CompressionSddBuilder<'a>
impl<'a> !Send for CompressionSddBuilder<'a>
impl<'a> !Sync for CompressionSddBuilder<'a>
impl<'a> Unpin for CompressionSddBuilder<'a>
impl<'a> !UnwindSafe for CompressionSddBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<'a, T> BottomUpBuilder<'a, SddPtr<'a>> for Twhere
T: SddBuilder<'a>,
impl<'a, T> BottomUpBuilder<'a, SddPtr<'a>> for Twhere
T: SddBuilder<'a>,
Source§fn condition(&'a self, f: SddPtr<'a>, lbl: VarLabel, value: bool) -> SddPtr<'a>
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>
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>
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>
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>
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>
fn compile_cnf(&'a self, cnf: &Cnf) -> SddPtr<'a>
compile an SDD from an input CNF
fn true_ptr(&self) -> SddPtr<'a>
fn false_ptr(&self) -> SddPtr<'a>
fn var(&'a self, label: VarLabel, polarity: bool) -> SddPtr<'a>
fn negate(&'a self, f: SddPtr<'a>) -> SddPtr<'a>
Source§fn eq(&'a self, a: SddPtr<'a>, b: SddPtr<'a>) -> bool
fn eq(&'a self, a: SddPtr<'a>, b: SddPtr<'a>) -> bool
Test for semantic equality (not pointer/structural equality)
fn and(&'a self, a: SddPtr<'a>, b: SddPtr<'a>) -> SddPtr<'a>
Source§fn or(&'a self, a: Ptr, b: Ptr) -> Ptr
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 andSource§fn compose(&'a self, f: Ptr, lbl: VarLabel, g: Ptr) -> Ptr
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
fn compile_logical_expr(&'a self, expr: &LogicalExpr) -> Ptr
directly compile a logical expression
Source§fn compile_plan(&'a self, expr: &BottomUpPlan) -> Ptr
fn compile_plan(&'a self, expr: &BottomUpPlan) -> Ptr
Compiles from a BottomUpPlan, which represents a deferred computation