pub enum SolveError {
Build(BddBuildError),
Unsatisfiable,
BadOrder {
var: VarId,
},
BadPlan {
what: &'static str,
},
SatTimeout,
SatUnsupported {
what: &'static str,
},
SatModelRejected,
SatSolverFailure {
what: &'static str,
},
}Expand description
Why a solve failed.
Variants§
Build(BddBuildError)
The constraints could not be turned into a BDD or, for an Engine
that fell back, into a CNF (including BddBuildError::TooLarge from
Solver, the SAT-fallback trigger).
Unsatisfiable
No assignment satisfies the constraints (LRM 18.6.3: randomize()
returns 0 and changes nothing).
BadOrder
The caller’s variable order names an unknown or repeated variable.
BadPlan
The Plan is malformed in a way other than naming a bad variable.
SatTimeout
The SAT fallback (super::sat) did not finish within its time limit.
SatUnsupported
The plan asks the SAT fallback for something it cannot sample
faithfully (a dist weighted by a count of models or of distinct
values, a randc variable too wide to enumerate); refused instead of
silently mis-weighted.
SatModelRejected
A model the SAT solver returned failed the IR’s own evaluator: a bug in the CNF encoding, never a legal outcome.
SatSolverFailure
The SAT solver itself failed (out of memory, an internal error) or contradicted itself; never a legal outcome.
Trait Implementations§
Source§impl Clone for SolveError
impl Clone for SolveError
Source§impl Debug for SolveError
impl Debug for SolveError
Source§impl Display for SolveError
impl Display for SolveError
impl Eq for SolveError
Source§impl Error for SolveError
impl Error for SolveError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<BddBuildError> for SolveError
impl From<BddBuildError> for SolveError
Source§fn from(e: BddBuildError) -> Self
fn from(e: BddBuildError) -> Self
Source§impl PartialEq for SolveError
impl PartialEq for SolveError
impl StructuralPartialEq for SolveError
Auto Trait Implementations§
impl Freeze for SolveError
impl RefUnwindSafe for SolveError
impl Send for SolveError
impl Sync for SolveError
impl Unpin for SolveError
impl UnsafeUnpin for SolveError
impl UnwindSafe for SolveError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.