Struct BiOptSat

Source
pub struct BiOptSat<O, PBE = GeneralizedTotalizer, CE = Totalizer, ProofW = BufWriter<File>, OInit = DefaultInitializer, BCG = fn(Assignment) -> Clause>
where ProofW: Write,
{ /* private fields */ }
Expand description

The BiOptSat algorithm type

§Generics

  • O: the SAT solver oracle
  • PBE: pseudo-Boolean objective encoding
  • CE: cardinality objective encoding
  • ProofW: the proof writer
  • OInit: the oracle initializer
  • BCG: the blocking clause generator

Trait Implementations§

Source§

impl<'learn, 'term, PBE, CE, ProofW, OInit, BCG> CoreBoost for BiOptSat<CaDiCaL<'learn, 'term>, PBE, CE, ProofW, OInit, BCG>
where ProofW: Write + 'static, (PBE, CE): MergeOllRef<PBE = PBE, CE = CE>, OInit: Initialize<CaDiCaL<'learn, 'term>>,

Source§

fn core_boost( &mut self, opts: CoreBoostingOptions, ) -> MaybeTerminatedError<bool>

Performs core boosting. Returns false if instance is unsat.
Source§

impl<O, PBE, CE, ProofW, OInit, BCG> ExtendedSolveStats for BiOptSat<O, PBE, CE, ProofW, OInit, BCG>
where O: SolveStats, ProofW: Write, PBE: EncodeStats, CE: EncodeStats,

Source§

fn oracle_stats(&self) -> SolverStats

Gets statistics from the internal oracle
Source§

fn encoding_stats(&self) -> Vec<EncodingStats>

Gets statistics from the objective encodings
Source§

impl<O, PBE, CE, ProofW, OInit, BCG> Init for BiOptSat<O, PBE, CE, ProofW, OInit, BCG>

Source§

fn new<Cls>( clauses: Cls, objs: Vec<Objective>, var_manager: VarManager, opts: KernelOptions, block_clause_gen: BCG, ) -> Result<Self>
where Cls: IntoIterator<Item = Clause>,

Initializes a default solver with a configured oracle and options. The oracle should not have any clauses loaded yet.

Source§

type Oracle = O

Source§

type BlockClauseGen = BCG

Source§

fn from_instance( inst: Instance, opts: KernelOptions, block_clause_gen: Self::BlockClauseGen, ) -> Result<Self>

Initialization of the algorithm using an Instance rather than iterators
Source§

impl<'term, 'learn, PBE, CE, ProofW, OInit, BCG> InitCert for BiOptSat<CaDiCaL<'term, 'learn>, PBE, CE, ProofW, OInit, BCG>
where ProofW: Write + 'static, PBE: BoundUpperIncremental + FromIterator<(Lit, usize)>, CE: BoundUpperIncremental + FromIterator<Lit>, OInit: Initialize<CaDiCaL<'term, 'learn>>, BCG: Fn(Assignment) -> Clause,

Source§

fn new_cert<Cls>( clauses: Cls, objs: Vec<Objective>, var_manager: VarManager, opts: KernelOptions, proof: Proof<Self::ProofWriter>, block_clause_gen: BCG, ) -> Result<Self>
where Cls: IntoIterator<Item = (Clause, AbsConstraintId)>,

Initializes a default solver with a configured oracle and options. The oracle should not have any clauses loaded yet.

Source§

type ProofWriter = ProofW

Source§

fn from_instance_cert( inst: Instance, opts: KernelOptions, proof: Proof<Self::ProofWriter>, block_clause_gen: <Self as Init>::BlockClauseGen, ) -> Result<Self>

Initialization of the algorithm using an Instance rather than iterators
Source§

impl<O, PBE, CE, ProofW, OInit, BCG> KernelFunctions for BiOptSat<O, PBE, CE, ProofW, OInit, BCG>
where ProofW: Write + Write, O: Interrupt,

Source§

fn pareto_front(&self) -> ParetoFront

Gets the Pareto front discovered so far
Source§

fn stats(&self) -> Stats

Gets tracked statistics from the solver
Source§

fn attach_logger<L: WriteSolverLog + 'static>(&mut self, logger: L)

Attaches a logger to the solver
Source§

fn detach_logger(&mut self) -> Option<Box<dyn WriteSolverLog>>

Detaches a logger from the solver
Source§

fn interrupter(&mut self) -> Interrupter

Gets an iterrupter to the solver
Source§

impl<'learn, 'term, ProofW, OInit, BCG> Solve for BiOptSat<CaDiCaL<'term, 'learn>, GeneralizedTotalizer, Totalizer, ProofW, OInit, BCG>
where BCG: Fn(Assignment) -> Clause, ProofW: Write + 'static,

Source§

fn solve(&mut self, limits: Limits) -> MaybeTerminatedError

Solves the instance under given limits. If not fully solved, returns an early termination reason.
Source§

fn all_stats(&self) -> (Stats, Option<SolverStats>, Option<Vec<EncodingStats>>)

Gets all statistics from the solver

Auto Trait Implementations§

§

impl<O, PBE, CE, ProofW, OInit, BCG> Freeze for BiOptSat<O, PBE, CE, ProofW, OInit, BCG>
where O: Freeze, BCG: Freeze, PBE: Freeze, CE: Freeze,

§

impl<O, PBE = GeneralizedTotalizer, CE = Totalizer, ProofW = BufWriter<File>, OInit = DefaultInitializer, BCG = fn(Assignment) -> Clause> !RefUnwindSafe for BiOptSat<O, PBE, CE, ProofW, OInit, BCG>

§

impl<O, PBE = GeneralizedTotalizer, CE = Totalizer, ProofW = BufWriter<File>, OInit = DefaultInitializer, BCG = fn(Assignment) -> Clause> !Send for BiOptSat<O, PBE, CE, ProofW, OInit, BCG>

§

impl<O, PBE = GeneralizedTotalizer, CE = Totalizer, ProofW = BufWriter<File>, OInit = DefaultInitializer, BCG = fn(Assignment) -> Clause> !Sync for BiOptSat<O, PBE, CE, ProofW, OInit, BCG>

§

impl<O, PBE, CE, ProofW, OInit, BCG> Unpin for BiOptSat<O, PBE, CE, ProofW, OInit, BCG>
where O: Unpin, BCG: Unpin, OInit: Unpin, PBE: Unpin, CE: Unpin,

§

impl<O, PBE = GeneralizedTotalizer, CE = Totalizer, ProofW = BufWriter<File>, OInit = DefaultInitializer, BCG = fn(Assignment) -> Clause> !UnwindSafe for BiOptSat<O, PBE, CE, ProofW, OInit, BCG>

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<Alg> InitCertDefaultBlock for Alg
where Alg: InitCert<BlockClauseGen = fn(Assignment) -> Clause>,

Source§

fn new_default_blocking_cert<Cls>( clauses: Cls, objs: Vec<Objective>, var_manager: VarManager, opts: KernelOptions, proof: Proof<Self::ProofWriter>, ) -> Result<Self>
where Cls: IntoIterator<Item = (Clause, AbsConstraintId)>,

Initializes the algorithm with the default blocking clause generator
Source§

fn from_instance_default_blocking_cert( inst: Instance, opts: KernelOptions, proof: Proof<Self::ProofWriter>, ) -> Result<Self>

Initializes the algorithm using an Instance rather than iterators with the default blocking clause generator
Source§

impl<Alg> InitDefaultBlock for Alg
where Alg: Init<BlockClauseGen = fn(Assignment) -> Clause>,

Source§

fn new_default_blocking<Cls>( clauses: Cls, objs: Vec<Objective>, var_manager: VarManager, opts: KernelOptions, ) -> Result<Self>
where Cls: IntoIterator<Item = Clause>,

Initializes the algorithm with the default blocking clause generator
Source§

fn from_instance_default_blocking( inst: Instance, opts: KernelOptions, ) -> Result<Self>

Initializes the algorithm using an Instance rather than iterators with the default blocking clause generator
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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