pub struct CounterExample {
pub assignments: Vec<(String, String)>,
}Expand description
A counterexample showing concrete values that falsify an assertion.
When Z3 finds that an assertion is not valid, it produces a model (set of variable assignments) that makes the negation of the assertion true. This counterexample helps users understand exactly why verification failed.
§Example Interpretation
If verifying x > 5 fails with counterexample x = 3, this means:
- The solver found that
x = 3is a possible value - With
x = 3, the assertionx > 5is false - Therefore the assertion is not universally valid
Fields§
§assignments: Vec<(String, String)>Variable assignments that make the assertion false.
Each tuple contains (variable_name, value_as_string).
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CounterExample
impl Debug for CounterExample
Auto Trait Implementations§
impl Freeze for CounterExample
impl RefUnwindSafe for CounterExample
impl Send for CounterExample
impl Sync for CounterExample
impl Unpin for CounterExample
impl UnsafeUnpin 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