pub trait TransitionSystem {
type Event;
// Required methods
fn transition(&mut self) -> Option<Self::Event>;
fn time(&self) -> Time;
fn time_tick(&mut self);
fn labels(&self) -> impl Iterator<Item = bool>;
fn state(&self) -> impl Iterator<Item = Val>;
// Provided methods
fn experiment<O: Oracle>(
&mut self,
duration: Time,
oracle: O,
running: Arc<AtomicBool>,
) -> RunOutcome { ... }
fn trace<T, O: Oracle>(&mut self, duration: Time, oracle: O, tracer: T)
where T: Tracer<Self::Event> { ... }
}Expand description
Trait for types that can execute like a transition system.
Together with an Oracle, it provides a verifiable system.
Required Associated Types§
Required Methods§
Sourcefn transition(&mut self) -> Option<Self::Event>
fn transition(&mut self) -> Option<Self::Event>
Performs a (random) transition on the TransitionSystem and returns the raised Event,
unless the execution is terminated and no further events can happen.
Sourcefn time(&self) -> Time
fn time(&self) -> Time
Current time of the TransitionSystem (for timed systems).
Sourcefn time_tick(&mut self)
fn time_tick(&mut self)
Increase current time of the TransitionSystem (for timed systems).
Sourcefn labels(&self) -> impl Iterator<Item = bool>
fn labels(&self) -> impl Iterator<Item = bool>
The current values of the TransitionSystem’s labels.
Sourcefn state(&self) -> impl Iterator<Item = Val>
fn state(&self) -> impl Iterator<Item = Val>
The current internal state of the TransitionSystem.
Provided Methods§
Sourcefn experiment<O: Oracle>(
&mut self,
duration: Time,
oracle: O,
running: Arc<AtomicBool>,
) -> RunOutcome
fn experiment<O: Oracle>( &mut self, duration: Time, oracle: O, running: Arc<AtomicBool>, ) -> RunOutcome
Runs a single execution of the TransitionSystem with a given Oracle and returns a RunOutcome.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.