A library for determining the satisfiability of boolean formulas written in conjunctive normal form, developed to support investigation into solvers by researchers, developers, or anyone curious.
//! Schedulers, used to interrupt a solve for some task.
//!//! These return true if an interrupt is due, and false otherwise.
//!//! For the moment, scheduling during a solve is experimental.
usecrate::context::GenericContext;impl<R:rand::Rng +std::default::Default>GenericContext<R>{/// Returns whether it is time for a interrupt based on whether fresh conflicts are a multiple of the current luby element.
pubfnluby_fresh_conflict_interrupt(&self)->bool{self.counters.fresh_conflicts %(self.config.luby_u *self.counters.luby.current())==0}/// Returns whether it is time for a interrupt based on whether total conflicts is multiple of the configured interval.
#[inline(always)]pubfnconflict_total_interrupt(&self)->bool{self.config
.scheduler
.conflict
.is_some_and(|interval|(self.counters.total_conflicts %(interval asusize))==0)}/// Returns whether it is time for a interrupt based on whether total restarts is multiple of the configured interval.
pubfnrestart_interrupt(&self)->bool{self.config
.scheduler
.restart
.is_some_and(|interval|(self.counters.restarts %(interval asusize))==0)}}