pub struct ACSThresholdAutomaton {
idx_ctx: IndexCtx,
interval_ta: IntervalThresholdAutomaton,
initial_locs: Vec<ACSLocation>,
initial_intervals: Vec<HashSet<ACSInterval>>,
rules: Vec<CSRule>,
}Expand description
A variant of an [IntervalThresholdAutomaton] allowing for low-memory
representations of configurations (by a ACSTAConfig) and efficient
predecessor computations
This type is a variant of an [IntervalThresholdAutomaton] that translates
variables (see CSVariable), locations (see ACSLocation) and intervals
(see ACSInterval) into indices, that can then be used to in
ACSTAConfig instead of the corresponding concrete types. The mapping is
then maintained in this type.
Additionally, initial location configurations and intervals, as well
as rules (see CSRule) are already translated into operations on the
abstracted states, such that they do not need to be translated on the fly.
Fields§
§idx_ctx: IndexCtxMain index maintaining the mapping of locations, variables and intervals
interval_ta: IntervalThresholdAutomaton[IntervalThresholdAutomaton] that this threshold automaton is an
abstraction of
initial_locs: Vec<ACSLocation>Initial locations (as ACSLocations)
initial_intervals: Vec<HashSet<ACSInterval>>Initial intervals (as ACSIntervals, indexed by CSVariable)
rules: Vec<CSRule>Rules operation on cs types
Implementations§
Source§impl ACSThresholdAutomaton
impl ACSThresholdAutomaton
Sourcepub fn new(interval_ta: IntervalThresholdAutomaton) -> Self
pub fn new(interval_ta: IntervalThresholdAutomaton) -> Self
Create the corresponding ACSThresholdAutomaton from the given
[IntervalThresholdAutomaton]
Sourcepub fn is_initial_loc(&self, loc: &ACSLocation) -> bool
pub fn is_initial_loc(&self, loc: &ACSLocation) -> bool
Check whether the location is an initial location, i.e. processes can start in this location
Sourcepub fn is_initial_interval(&self, var: &CSVariable, i: &ACSInterval) -> bool
pub fn is_initial_interval(&self, var: &CSVariable, i: &ACSInterval) -> bool
Check whether the interval i is an initial interval for variable
var
Sourcepub fn get_zero_interval(&self, var: &CSVariable) -> ACSInterval
pub fn get_zero_interval(&self, var: &CSVariable) -> ACSInterval
Get the zero interval for variable var
Sourcepub fn get_all_intervals<'a>(
&'a self,
var: &'a CSVariable,
) -> impl Iterator<Item = &'a ACSInterval>
pub fn get_all_intervals<'a>( &'a self, var: &'a CSVariable, ) -> impl Iterator<Item = &'a ACSInterval>
Get all intervals for the variable
Sourcepub fn get_prev_interval(
&self,
_var: &CSVariable,
interval: &ACSInterval,
) -> Option<ACSInterval>
pub fn get_prev_interval( &self, _var: &CSVariable, interval: &ACSInterval, ) -> Option<ACSInterval>
Get the previous interval
Sourcepub fn get_next_interval(
&self,
var: &CSVariable,
interval: &ACSInterval,
) -> Option<ACSInterval>
pub fn get_next_interval( &self, var: &CSVariable, interval: &ACSInterval, ) -> Option<ACSInterval>
Get the next interval
Sourcepub fn variables(&self) -> impl Iterator<Item = &CSVariable>
pub fn variables(&self) -> impl Iterator<Item = &CSVariable>
Get all variables appearing in the threshold automaton
Sourcepub fn locations(&self) -> impl Iterator<Item = &ACSLocation>
pub fn locations(&self) -> impl Iterator<Item = &ACSLocation>
Get all ACSLocations of the automaton
Sourcepub fn get_rule_by_id(&self, id: u32) -> Option<&Rule>
pub fn get_rule_by_id(&self, id: u32) -> Option<&Rule>
Get rule by id
Sourcepub fn get_interval_ta(&self) -> &IntervalThresholdAutomaton
pub fn get_interval_ta(&self) -> &IntervalThresholdAutomaton
Get a reference to the interval threshold automaton the automaton has been derived from
Trait Implementations§
Source§impl Clone for ACSThresholdAutomaton
impl Clone for ACSThresholdAutomaton
Source§fn clone(&self) -> ACSThresholdAutomaton
fn clone(&self) -> ACSThresholdAutomaton
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ACSThresholdAutomaton
impl Debug for ACSThresholdAutomaton
Source§impl Display for ACSThresholdAutomaton
impl Display for ACSThresholdAutomaton
Source§impl From<IntervalThresholdAutomaton> for ACSThresholdAutomaton
impl From<IntervalThresholdAutomaton> for ACSThresholdAutomaton
Source§impl IsDeclared<Location> for ACSThresholdAutomaton
impl IsDeclared<Location> for ACSThresholdAutomaton
Source§fn is_declared(&self, obj: &Location) -> bool
fn is_declared(&self, obj: &Location) -> bool
Source§impl IsDeclared<Parameter> for ACSThresholdAutomaton
impl IsDeclared<Parameter> for ACSThresholdAutomaton
Source§fn is_declared(&self, obj: &Parameter) -> bool
fn is_declared(&self, obj: &Parameter) -> bool
Source§impl IsDeclared<Variable> for ACSThresholdAutomaton
impl IsDeclared<Variable> for ACSThresholdAutomaton
Source§fn is_declared(&self, obj: &Variable) -> bool
fn is_declared(&self, obj: &Variable) -> bool
Source§impl ThresholdAutomaton for ACSThresholdAutomaton
impl ThresholdAutomaton for ACSThresholdAutomaton
Source§type InitialVariableConstraintType = IntervalConstraint
type InitialVariableConstraintType = IntervalConstraint
Source§fn parameters(&self) -> impl Iterator<Item = &Parameter>
fn parameters(&self) -> impl Iterator<Item = &Parameter>
Source§fn initial_location_constraints(
&self,
) -> impl Iterator<Item = &LocationConstraint>
fn initial_location_constraints( &self, ) -> impl Iterator<Item = &LocationConstraint>
Source§fn initial_variable_constraints(
&self,
) -> impl Iterator<Item = &Self::InitialVariableConstraintType>
fn initial_variable_constraints( &self, ) -> impl Iterator<Item = &Self::InitialVariableConstraintType>
Source§fn resilience_conditions(
&self,
) -> impl Iterator<Item = &BooleanExpression<Parameter>>
fn resilience_conditions( &self, ) -> impl Iterator<Item = &BooleanExpression<Parameter>>
Source§fn variables(&self) -> impl Iterator<Item = &Variable>
fn variables(&self) -> impl Iterator<Item = &Variable>
Source§fn locations(&self) -> impl Iterator<Item = &Location>
fn locations(&self) -> impl Iterator<Item = &Location>
Source§fn can_be_initial_location(&self, location: &Location) -> bool
fn can_be_initial_location(&self, location: &Location) -> bool
Source§fn incoming_rules(
&self,
location: &Location,
) -> impl Iterator<Item = &Self::Rule>
fn incoming_rules( &self, location: &Location, ) -> impl Iterator<Item = &Self::Rule>
Source§fn outgoing_rules(
&self,
location: &Location,
) -> impl Iterator<Item = &Self::Rule>
fn outgoing_rules( &self, location: &Location, ) -> impl Iterator<Item = &Self::Rule>
§fn has_decrements_or_resets(&self) -> bool
fn has_decrements_or_resets(&self) -> bool
§fn has_decrements(&self) -> bool
fn has_decrements(&self) -> bool
§fn has_resets(&self) -> bool
fn has_resets(&self) -> bool
Auto Trait Implementations§
impl Freeze for ACSThresholdAutomaton
impl RefUnwindSafe for ACSThresholdAutomaton
impl Send for ACSThresholdAutomaton
impl Sync for ACSThresholdAutomaton
impl Unpin for ACSThresholdAutomaton
impl UnwindSafe for ACSThresholdAutomaton
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DOTDiff for Twhere
T: AutomatonEncoding,
impl<T> DOTDiff for Twhere
T: AutomatonEncoding,
§fn get_dot_diff(&self, other: &T) -> String
fn get_dot_diff(&self, other: &T) -> String
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more