pub struct BinaryImplicationGraph { /* private fields */ }Expand description
Binary Implication Graph optimizer
Implementations§
Source§impl BinaryImplicationGraph
impl BinaryImplicationGraph
Sourcepub fn build(&mut self, clauses: &ClauseDatabase)
pub fn build(&mut self, clauses: &ClauseDatabase)
Build the implication graph from clause database
Sourcepub fn transitive_reduction(&mut self) -> Vec<(Lit, Lit)>
pub fn transitive_reduction(&mut self) -> Vec<(Lit, Lit)>
Perform transitive reduction to remove redundant implications
An edge a => c is redundant if there exists a path a => b => c
Sourcepub fn find_sccs(&mut self) -> Vec<Vec<Lit>>
pub fn find_sccs(&mut self) -> Vec<Vec<Lit>>
Detect strongly connected components using Tarjan’s algorithm
Literals in the same SCC are equivalent (mutual implication)
Sourcepub fn optimize(&mut self, clauses: &mut ClauseDatabase)
pub fn optimize(&mut self, clauses: &mut ClauseDatabase)
Apply BIG optimizations to clause database
Removes redundant binary clauses found through transitive reduction
Sourcepub fn get_implications(&self, lit: Lit) -> Vec<Lit>
pub fn get_implications(&self, lit: Lit) -> Vec<Lit>
Get all implications for a literal
Sourcepub fn reset_stats(&mut self)
pub fn reset_stats(&mut self)
Reset statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BinaryImplicationGraph
impl RefUnwindSafe for BinaryImplicationGraph
impl Send for BinaryImplicationGraph
impl Sync for BinaryImplicationGraph
impl Unpin for BinaryImplicationGraph
impl UnsafeUnpin for BinaryImplicationGraph
impl UnwindSafe for BinaryImplicationGraph
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more