Skip to main content

Verdict

Enum Verdict 

Source
#[non_exhaustive]
pub enum Verdict {
Show 15 variants Success, InvariantViolated { property: String, initial: bool, }, PropertyViolatedInitially { property: String, }, ActionPropertyViolated { property: String, }, Deadlock, AssumptionFalse { property: String, message: String, }, PostconditionFalse { property: String, message: String, }, ModelError { code: u32, name: String, message: String, }, NotCompletelySpecified { initial: bool, variables: Vec<String>, message: String, initial_candidate: Option<PartialState>, }, EvaluationError { site: ErrorSite, code: u32, name: &'static str, reported: u32, message: String, verified: bool, cause: EvalError, invariant: Option<String>, }, Unsupported { feature: String, }, ResourceLimit { message: String, }, Stopped(Box<Stopped>), BudgetMeasurement { error: MeasurementError, }, InternalError { message: String, },
}
Expand description

The verdict of a check.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Success

The search finished without finding a violation.

§

InvariantViolated

An invariant is violated, in an initial state (initial) or a later one.

Fields

§property: String

The invariant, as TLC names it.

§initial: bool

Whether the violating state is an initial state.

§

PropertyViolatedInitially

An implied initial predicate (a state-level part of a PROPERTY) is violated by an initial state.

Fields

§property: String

The property.

§

ActionPropertyViolated

An implied action ([][A]_v in a PROPERTY) is violated by a step.

Fields

§property: String

The property.

§

Deadlock

A reachable state has no successor at all.

§

AssumptionFalse

An ASSUME is false.

Fields

§property: String

The failed assumption’s source image, as TLC names the property.

§message: String

TLC’s message.

§

PostconditionFalse

A POSTCONDITION is not TRUE after a complete search.

Fields

§property: String

The postcondition.

§message: String

TLC’s message (TLC_POSTCONDITION_FALSE).

§

ModelError

TLC’s error while processing the model (configuration, constants, start-up evaluation), as the binding stage reports it.

Fields

§code: u32

TLC’s message code.

§name: String

Its EC name.

§message: String

TLC’s message.

§

NotCompletelySpecified

A successor leaves a variable unassigned.

Fields

§initial: bool

Whether it is an initial state.

§variables: Vec<String>

The unassigned variables.

§message: String

TLC’s message (TLC_STATE_NOT_COMPLETELY_SPECIFIED_NEXT, or TLC_INITIAL_STATE for an initial state).

§initial_candidate: Option<PartialState>

Actual partial Init candidate, printed inside TLC’s error message, separately from its absent formal counterexample.

§

EvaluationError

Evaluation failed with an error TLC also raises (including a failed Assert and integer overflow), classified as TLC classifies it at site (the error-class table in class.rs).

Fields

§site: ErrorSite

Where.

§code: u32

TLC’s deciding code: what its run returns, which decides its exit status (ModelChecker.modelCheck). After an error while exploring, TLC replays the step with its call stack recorded, and the replay decides it (TLC_NESTED_EXPRESSION, or the code of the EvalException it meets again).

§name: &'static str

Its EC name.

§reported: u32

The code of the error message TLC prints first: the site’s wrapper (TLC_INVARIANT_EVALUATION_FAILED, GENERAL, …) or the error’s own code.

§message: String

The text of that message, as TLC prints it.

§verified: bool

Whether code is checked against captured TLC runs for this site and this kind of error. An unverified class is reported but not claimed.

§cause: EvalError

The evaluation error itself.

§invariant: Option<String>

The invariant whose evaluation raised cause, retained separately from TLC’s deciding error class and diagnostic replay.

§

Unsupported

dive refused, naming the feature. Never a verdict about the model.

Fields

§feature: String

The feature.

§

ResourceLimit

A resource limit (evaluation depth, memory) was hit. Never a verdict about the model.

Fields

§message: String

What.

§

Stopped(Box<Stopped>)

The run’s budget (--time-limit, --max-memory) was exhausted. Never a verdict about the model; the statistics are those at the stop.

§

BudgetMeasurement

A required process-memory observation failed; never a model verdict.

Fields

§error: MeasurementError

Typed measurement failure, without an invented observed byte count.

§

InternalError

An internal invariant of dive failed: a bug, never a verdict.

Fields

§message: String

What.

Implementations§

Source§

impl Verdict

Source

pub const fn kind(&self) -> &'static str

The verdict’s kebab-case name in dive’s output.

Source

pub fn property(&self) -> Option<&str>

The violated property, where there is one.

Source

pub const fn is_verdict(&self) -> bool

Whether this is a verdict about the model (as opposed to a refusal, a resource limit or a bug).

Source

pub fn tlc(&self) -> Option<TlcClass>

TLC’s classification of this verdict, where TLC has one.

Trait Implementations§

Source§

impl Clone for Verdict

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Verdict

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Verdict

Source§

impl From<&BindError> for Verdict

Source§

fn from(e: &BindError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Verdict

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Verdict

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.