pub struct BackboneDetector { /* private fields */ }Expand description
Backbone detector
Implementations§
Source§impl BackboneDetector
impl BackboneDetector
Sourcepub fn with_algorithm(algorithm: BackboneAlgorithm) -> Self
pub fn with_algorithm(algorithm: BackboneAlgorithm) -> Self
Create with specific algorithm
Sourcepub fn is_backbone(&self, lit: Lit) -> bool
pub fn is_backbone(&self, lit: Lit) -> bool
Check if a literal is in the backbone
Sourcepub fn add_backbone(&mut self, lit: Lit)
pub fn add_backbone(&mut self, lit: Lit)
Add a literal to the backbone
Sourcepub fn remove_backbone(&mut self, lit: Lit)
pub fn remove_backbone(&mut self, lit: Lit)
Remove a literal from the backbone
Sourcepub fn detect_iterative<F>(
&mut self,
candidates: &[Lit],
is_sat_with_assumption: F,
)
pub fn detect_iterative<F>( &mut self, candidates: &[Lit], is_sat_with_assumption: F, )
Detect backbone using iterative algorithm
For each literal l, check if the formula is UNSAT under assumption ~l. If UNSAT, then l must be in the backbone.
Sourcepub fn detect_binary_search<F>(
&mut self,
candidates: &[Lit],
is_sat_with_assumptions: F,
)
pub fn detect_binary_search<F>( &mut self, candidates: &[Lit], is_sat_with_assumptions: F, )
Detect backbone using binary search
Recursively partition the candidate set and test groups. More efficient when the backbone is large.
Sourcepub fn compute_rotatable(&self, all_lits: &[Lit]) -> Vec<Lit>
pub fn compute_rotatable(&self, all_lits: &[Lit]) -> Vec<Lit>
Compute rotatable literals (non-backbone)
A literal is rotatable if it can be both true and false in different satisfying assignments.
Sourcepub fn stats(&self) -> &BackboneStats
pub fn stats(&self) -> &BackboneStats
Get statistics
Sourcepub fn algorithm(&self) -> BackboneAlgorithm
pub fn algorithm(&self) -> BackboneAlgorithm
Get the algorithm being used
Sourcepub fn set_algorithm(&mut self, algorithm: BackboneAlgorithm)
pub fn set_algorithm(&mut self, algorithm: BackboneAlgorithm)
Set the algorithm to use
Trait Implementations§
Source§impl Debug for BackboneDetector
impl Debug for BackboneDetector
Auto Trait Implementations§
impl Freeze for BackboneDetector
impl RefUnwindSafe for BackboneDetector
impl Send for BackboneDetector
impl Sync for BackboneDetector
impl Unpin for BackboneDetector
impl UnsafeUnpin for BackboneDetector
impl UnwindSafe for BackboneDetector
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