pub struct ModelChecker { /* private fields */ }Expand description
Main class of (and entrypoint to) the model checking testing technique.
Implementations§
Source§impl ModelChecker
impl ModelChecker
Sourcepub fn new(sys: &System) -> Self
pub fn new(sys: &System) -> Self
Creates a new model checker with the specified strategy and initial state equal to the current state of the system.
Sourcepub fn run<S: Strategy>(&mut self, strategy_config: StrategyConfig) -> McResult
pub fn run<S: Strategy>(&mut self, strategy_config: StrategyConfig) -> McResult
Runs model checking and returns the result on completion.
Sourcepub fn run_with_change<S>(
&mut self,
strategy_config: StrategyConfig,
preliminary_callback: impl FnOnce(&mut McSystem),
) -> McResultwhere
S: Strategy,
pub fn run_with_change<S>(
&mut self,
strategy_config: StrategyConfig,
preliminary_callback: impl FnOnce(&mut McSystem),
) -> McResultwhere
S: Strategy,
Runs model checking after applying callback.
Sourcepub fn run_from_states<S: Strategy>(
&mut self,
strategy_config: StrategyConfig,
states: HashSet<McState>,
) -> McResult
pub fn run_from_states<S: Strategy>( &mut self, strategy_config: StrategyConfig, states: HashSet<McState>, ) -> McResult
Runs model checking from a set of initial states.
Sourcepub fn run_from_states_with_change<S>(
&mut self,
strategy_config: StrategyConfig,
states: HashSet<McState>,
preliminary_callback: impl Fn(&mut McSystem),
) -> McResultwhere
S: Strategy,
pub fn run_from_states_with_change<S>(
&mut self,
strategy_config: StrategyConfig,
states: HashSet<McState>,
preliminary_callback: impl Fn(&mut McSystem),
) -> McResultwhere
S: Strategy,
Runs model checking from a set of initial states after applying callback.
Auto Trait Implementations§
impl Freeze for ModelChecker
impl !RefUnwindSafe for ModelChecker
impl !Send for ModelChecker
impl !Sync for ModelChecker
impl Unpin for ModelChecker
impl !UnwindSafe for ModelChecker
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.