Skip to main content

ThresholdAutomaton

Trait ThresholdAutomaton 

Source
pub trait ThresholdAutomaton:
    Debug
    + Clone
    + Display
    + IsDeclared<Parameter>
    + IsDeclared<Variable>
    + IsDeclared<Location> {
    type Rule: RuleDefinition;
    type InitialVariableConstraintType: VariableConstraint;

Show 14 methods // Required methods fn name(&self) -> &str; fn parameters(&self) -> impl Iterator<Item = &Parameter>; fn initial_location_constraints( &self, ) -> impl Iterator<Item = &LocationConstraint>; fn initial_variable_constraints( &self, ) -> impl Iterator<Item = &Self::InitialVariableConstraintType>; fn resilience_conditions( &self, ) -> impl Iterator<Item = &BooleanExpression<Parameter>>; fn variables(&self) -> impl Iterator<Item = &Variable>; fn locations(&self) -> impl Iterator<Item = &Location>; fn can_be_initial_location(&self, location: &Location) -> bool; fn rules(&self) -> impl Iterator<Item = &Self::Rule>; fn incoming_rules( &self, location: &Location, ) -> impl Iterator<Item = &Self::Rule>; fn outgoing_rules( &self, location: &Location, ) -> impl Iterator<Item = &Self::Rule>; // Provided methods fn has_decrements_or_resets(&self) -> bool { ... } fn has_decrements(&self) -> bool { ... } fn has_resets(&self) -> bool { ... }
}
Expand description

Common trait for different types of threshold automata

This trait is implemented by all types and flavors of threshold automata and provides a common interface for interacting with threshold automata.

This trait is for example implemented by general_threshold_automaton::GeneralThresholdAutomaton or lia_threshold_automaton::LIAThresholdAutomaton.

Required Associated Types§

Source

type Rule: RuleDefinition

Type of the rules of the threshold automaton

Source

type InitialVariableConstraintType: VariableConstraint

Type of the initial variable conditions of the threshold automaton

Required Methods§

Source

fn name(&self) -> &str

Get the name of the threshold automaton

Source

fn parameters(&self) -> impl Iterator<Item = &Parameter>

Get the parameters of the threshold automaton

Source

fn initial_location_constraints( &self, ) -> impl Iterator<Item = &LocationConstraint>

Get the initial location constraints of the threshold automaton

Source

fn initial_variable_constraints( &self, ) -> impl Iterator<Item = &Self::InitialVariableConstraintType>

Get the initial variable constraints of the threshold automaton

Source

fn resilience_conditions( &self, ) -> impl Iterator<Item = &BooleanExpression<Parameter>>

Get the resilience condition of the threshold automaton

Source

fn variables(&self) -> impl Iterator<Item = &Variable>

Get the shared variables of the threshold automaton

Source

fn locations(&self) -> impl Iterator<Item = &Location>

Get the locations of the threshold automaton

Source

fn can_be_initial_location(&self, location: &Location) -> bool

Check if a location can be initial by the location constraints of the threshold automaton

Returns true if the location can be an initial location of the threshold

Source

fn rules(&self) -> impl Iterator<Item = &Self::Rule>

Get the rules of the threshold automaton

Source

fn incoming_rules( &self, location: &Location, ) -> impl Iterator<Item = &Self::Rule>

Get incoming rules to a location

Returns the rules that have the given location as target location. This means that the location is the target of the transition.

Source

fn outgoing_rules( &self, location: &Location, ) -> impl Iterator<Item = &Self::Rule>

Get outgoing rules for a location

Returns the rules that have the given location as source location.

Provided Methods§

Source

fn has_decrements_or_resets(&self) -> bool

Check whether the threshold automaton contains any decrements or resets

Source

fn has_decrements(&self) -> bool

Check whether the threshold automaton contains any decrements

Source

fn has_resets(&self) -> bool

Check whether the threshold automaton contains any resets

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§