[][src]Struct stateright::checker::Checker

pub struct Checker<'a, SM: StateMachine> { /* fields omitted */ }

Generates every state reachable by a state machine, and verifies that all properties hold. Can be instantiated with model.checker().

Methods

impl<'a, SM: StateMachine> Checker<'a, SM> where
    SM: Sync,
    SM::State: Debug + Hash + Send + Sync,
    SM::Action: Debug
[src]

pub fn check(&mut self, max_count: usize) -> &mut Self[src]

Visits up to a specified number of states checking the model's properties. May return earlier when all states have been checked or all the properties are resolved.

pub fn example(&self, name: &'static str) -> Option<Path<SM::State, SM::Action>>[src]

An example of a "sometimes" property. None indicates that the property exists but no example has been found. Will panic if a corresponding "sometimes" property does not exist.

pub fn counterexample(
    &self,
    name: &'static str
) -> Option<Path<SM::State, SM::Action>>
[src]

A counterexaple of an "always" property. None indicates that the property exists but no counterexample has been found. Will panic if a corresponding "always" property does not exist.

pub fn check_and_report(&mut self, w: &mut impl Write)[src]

Blocks the thread until model checking is complete. Periodically emits a status while checking, tailoring the block size to the checking speed. Emits a report when complete.

pub fn is_done(&'a self) -> bool[src]

Indicates that either all properties have associated discoveries or all reachable states have been visited.

pub fn generated_count(&self) -> usize[src]

Indicates how many states were generated during model checking.

pub fn generated_fingerprints(&self) -> HashSet<Fingerprint>[src]

Extracts the fingerprints generated during model checking.

Auto Trait Implementations

impl<'a, SM> !RefUnwindSafe for Checker<'a, SM>

impl<'a, SM> !Send for Checker<'a, SM>

impl<'a, SM> Sync for Checker<'a, SM> where
    SM: Sync,
    <SM as StateMachine>::State: Sync

impl<'a, SM> Unpin for Checker<'a, SM> where
    SM: Unpin,
    <SM as StateMachine>::State: Unpin

impl<'a, SM> !UnwindSafe for Checker<'a, SM>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,