pub struct CounterExample {
pub quantifier: TermId,
pub assignment: FxHashMap<Spur, TermId>,
pub witnesses: Vec<TermId>,
pub body_value: Option<TermId>,
pub quality: f64,
pub generation: u32,
}Expand description
A counter-example to a quantified formula
Fields§
§quantifier: TermIdThe quantifier this is a counterexample for
assignment: FxHashMap<Spur, TermId>Assignment to bound variables
witnesses: Vec<TermId>Witness terms (the concrete values assigned)
body_value: Option<TermId>Evaluation of the body under this assignment
quality: f64Quality score (higher = better counterexample)
generation: u32Generation at which this was found
Implementations§
Source§impl CounterExample
impl CounterExample
Sourcepub fn new(
quantifier: TermId,
assignment: FxHashMap<Spur, TermId>,
witnesses: Vec<TermId>,
generation: u32,
) -> Self
pub fn new( quantifier: TermId, assignment: FxHashMap<Spur, TermId>, witnesses: Vec<TermId>, generation: u32, ) -> Self
Create a new counter-example
Sourcepub fn to_instantiation(&self, result: TermId) -> Instantiation
pub fn to_instantiation(&self, result: TermId) -> Instantiation
Convert to an instantiation
Sourcepub fn calculate_quality(&mut self, manager: &TermManager)
pub fn calculate_quality(&mut self, manager: &TermManager)
Calculate quality score based on term complexity
Trait Implementations§
Source§impl Clone for CounterExample
impl Clone for CounterExample
Source§fn clone(&self) -> CounterExample
fn clone(&self) -> CounterExample
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CounterExample
impl RefUnwindSafe for CounterExample
impl Send for CounterExample
impl Sync for CounterExample
impl Unpin for CounterExample
impl UnwindSafe for CounterExample
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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 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>
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