Struct splr::processor::Eliminator

source ·
pub struct Eliminator {
    pub num_subsumed: usize,
    /* private fields */
}
Expand description

Literal eliminator

Fields§

§num_subsumed: usize

Implementations§

source§

impl Eliminator

source

pub fn add_cid_occur( &mut self, asg: &mut impl AssignIF, cid: ClauseId, c: &mut Clause, enqueue: bool )

register a clause id to all corresponding occur lists.

source

pub fn remove_cid_occur( &mut self, asg: &mut impl AssignIF, cid: ClauseId, c: &mut Clause )

remove a clause id from all corresponding occur lists.

source

pub fn backward_subsumption_check( &mut self, asg: &mut impl AssignIF, cdb: &mut impl ClauseDBIF, timedout: &mut usize ) -> MaybeInconsistent

returns false if solver is inconsistent

  • calls clause_queue.pop
source

pub fn remove_lit_occur( &mut self, asg: &mut impl AssignIF, l: Lit, cid: ClauseId )

remove a clause id from literal’s occur list.

source

pub fn enqueue_clause(&mut self, cid: ClauseId, c: &mut Clause)

clause queue operations

enqueue a clause into eliminator’s clause queue.

source§

impl Eliminator

source

pub fn try_subsume( &mut self, asg: &mut impl AssignIF, cdb: &mut impl ClauseDBIF, cid: ClauseId, did: ClauseId ) -> MaybeInconsistent

Trait Implementations§

source§

impl Clone for Eliminator

source§

fn clone(&self) -> Eliminator

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Eliminator

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Eliminator

source§

fn default() -> Eliminator

Returns the “default value” for a type. Read more
source§

impl EliminateIF for Eliminator

source§

fn is_running(&self) -> bool

check if the eliminator is running.
source§

fn prepare( &mut self, asg: &mut impl AssignIF, cdb: &mut impl ClauseDBIF, force: bool )

rebuild occur lists.
source§

fn enqueue_var(&mut self, asg: &mut impl AssignIF, vi: VarId, upward: bool)

enqueue a var into eliminator’s var queue.
source§

fn simplify( &mut self, asg: &mut impl AssignIF, cdb: &mut impl ClauseDBIF, state: &mut State, force_run: bool ) -> MaybeInconsistent

simplify database by: Read more
source§

fn sorted_iterator(&self) -> Iter<'_, u32>

return the order of vars based on their occurrences
source§

fn stats(&self, vi: VarId) -> Option<(usize, usize)>

return vi’s stats
source§

fn eliminated_lits(&mut self) -> &mut Vec<Lit>

return the constraints on eliminated literals.
source§

impl Index<&Lit> for Eliminator

§

type Output = LitOccurs

The returned type after indexing.
source§

fn index(&self, l: &Lit) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl Index<&usize> for Eliminator

§

type Output = LitOccurs

The returned type after indexing.
source§

fn index(&self, i: &VarId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl Index<Lit> for Eliminator

§

type Output = LitOccurs

The returned type after indexing.
source§

fn index(&self, l: Lit) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl Index<Range<usize>> for Eliminator

§

type Output = [LitOccurs]

The returned type after indexing.
source§

fn index(&self, r: Range<usize>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl Index<RangeFrom<usize>> for Eliminator

§

type Output = [LitOccurs]

The returned type after indexing.
source§

fn index(&self, r: RangeFrom<usize>) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl Index<usize> for Eliminator

§

type Output = LitOccurs

The returned type after indexing.
source§

fn index(&self, i: VarId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl IndexMut<&Lit> for Eliminator

source§

fn index_mut(&mut self, l: &Lit) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<&usize> for Eliminator

source§

fn index_mut(&mut self, i: &VarId) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<Lit> for Eliminator

source§

fn index_mut(&mut self, l: Lit) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<Range<usize>> for Eliminator

source§

fn index_mut(&mut self, r: Range<usize>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<RangeFrom<usize>> for Eliminator

source§

fn index_mut(&mut self, r: RangeFrom<usize>) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<usize> for Eliminator

source§

fn index_mut(&mut self, i: VarId) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl Instantiate for Eliminator

source§

fn instantiate(config: &Config, cnf: &CNFDescription) -> Eliminator

make and return an object from Config and CNFDescription.
source§

fn handle(&mut self, e: SolverEvent)

update by a solver event.

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<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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.