pub struct Solver { /* private fields */ }solver only.Expand description
Main CDCL(T) SMT Solver
Implementations§
Source§impl Solver
impl Solver
Sourcepub fn with_config(config: SolverConfig) -> Solver
pub fn with_config(config: SolverConfig) -> Solver
Create a new solver with configuration
Sourcepub fn get_proof(&self) -> Option<&Proof>
pub fn get_proof(&self) -> Option<&Proof>
Get the proof (if proof generation is enabled and the result is unsat)
Sourcepub fn get_statistics(&self) -> &Statistics
pub fn get_statistics(&self) -> &Statistics
Get the solver statistics
Sourcepub fn reset_statistics(&mut self)
pub fn reset_statistics(&mut self)
Reset the solver statistics
Sourcepub fn set_theory_aware_branching(&mut self, enabled: bool)
pub fn set_theory_aware_branching(&mut self, enabled: bool)
Enable or disable theory-aware branching
Sourcepub fn theory_aware_branching(&self) -> bool
pub fn theory_aware_branching(&self) -> bool
Check if theory-aware branching is enabled
Sourcepub fn set_produce_unsat_cores(&mut self, produce: bool)
pub fn set_produce_unsat_cores(&mut self, produce: bool)
Enable or disable unsat core production
Sourcepub fn assert(&mut self, term: TermId, manager: &mut TermManager)
pub fn assert(&mut self, term: TermId, manager: &mut TermManager)
Assert a term
Sourcepub fn assert_named(
&mut self,
term: TermId,
name: &str,
manager: &mut TermManager,
)
pub fn assert_named( &mut self, term: TermId, name: &str, manager: &mut TermManager, )
Assert a named term (for unsat core tracking)
Sourcepub fn get_unsat_core(&self) -> Option<&UnsatCore>
pub fn get_unsat_core(&self) -> Option<&UnsatCore>
Get the unsat core (after check() returned Unsat)
Sourcepub fn check(&mut self, manager: &mut TermManager) -> SolverResult
pub fn check(&mut self, manager: &mut TermManager) -> SolverResult
Check satisfiability
Sourcepub fn check_with_assumptions(
&mut self,
assumptions: &[TermId],
manager: &mut TermManager,
) -> SolverResult
pub fn check_with_assumptions( &mut self, assumptions: &[TermId], manager: &mut TermManager, ) -> SolverResult
Check satisfiability under assumptions Assumptions are temporary constraints that don’t modify the assertion stack
Sourcepub fn check_sat_only(&mut self, manager: &mut TermManager) -> SolverResult
pub fn check_sat_only(&mut self, manager: &mut TermManager) -> SolverResult
Check satisfiability (pure SAT, no theory integration) Useful for benchmarking or when theories are not needed
Sourcepub fn enable_assumption_based_cores(&mut self)
pub fn enable_assumption_based_cores(&mut self)
Enable assumption-based unsat core tracking This creates assumption variables for each assertion which can be used to efficiently extract minimal unsat cores
Sourcepub fn minimize_unsat_core(
&mut self,
manager: &mut TermManager,
) -> Option<UnsatCore>
pub fn minimize_unsat_core( &mut self, manager: &mut TermManager, ) -> Option<UnsatCore>
Minimize an unsat core using greedy deletion This creates a minimal (but not necessarily minimum) unsatisfiable subset
Sourcepub fn assert_many(&mut self, terms: &[TermId], manager: &mut TermManager)
pub fn assert_many(&mut self, terms: &[TermId], manager: &mut TermManager)
Assert multiple terms at once This is more efficient than calling assert() multiple times
Sourcepub fn num_assertions(&self) -> usize
pub fn num_assertions(&self) -> usize
Get the number of assertions in the solver
Sourcepub fn num_variables(&self) -> usize
pub fn num_variables(&self) -> usize
Get the number of variables in the SAT solver
Sourcepub fn has_assertions(&self) -> bool
pub fn has_assertions(&self) -> bool
Check if the solver has any assertions
Sourcepub fn context_level(&self) -> usize
pub fn context_level(&self) -> usize
Get the current context level (push/pop depth)
Sourcepub fn config(&self) -> &SolverConfig
pub fn config(&self) -> &SolverConfig
Get the configuration
Sourcepub fn set_config(&mut self, config: SolverConfig)
pub fn set_config(&mut self, config: SolverConfig)
Set configuration
Sourcepub fn stats(&self) -> &SolverStats
pub fn stats(&self) -> &SolverStats
Get solver statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Solver
impl !RefUnwindSafe for Solver
impl Send for Solver
impl Sync for Solver
impl Unpin for Solver
impl !UnwindSafe for Solver
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
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>
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>
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