ACSThresholdAutomaton

Struct ACSThresholdAutomaton 

Source
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: IndexCtx

Main 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

Source

pub fn new(interval_ta: IntervalThresholdAutomaton) -> Self

Create the corresponding ACSThresholdAutomaton from the given [IntervalThresholdAutomaton]

Source

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

Source

pub fn is_initial_interval(&self, var: &CSVariable, i: &ACSInterval) -> bool

Check whether the interval i is an initial interval for variable var

Source

pub fn get_zero_interval(&self, var: &CSVariable) -> ACSInterval

Get the zero interval for variable var

Source

pub fn get_all_intervals<'a>( &'a self, var: &'a CSVariable, ) -> impl Iterator<Item = &'a ACSInterval>

Get all intervals for the variable

Source

pub fn get_prev_interval( &self, _var: &CSVariable, interval: &ACSInterval, ) -> Option<ACSInterval>

Get the previous interval

Source

pub fn get_next_interval( &self, var: &CSVariable, interval: &ACSInterval, ) -> Option<ACSInterval>

Get the next interval

Source

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

Get all variables appearing in the threshold automaton

Source

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

Get all ACSLocations of the automaton

Source

pub fn rules(&self) -> impl Iterator<Item = &CSRule>

Get all rules of the automaton

Source

pub fn get_rule_by_id(&self, id: u32) -> Option<&Rule>

Get rule by id

Source

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

Source§

fn clone(&self) -> ACSThresholdAutomaton

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ACSThresholdAutomaton

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ACSThresholdAutomaton

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<IntervalThresholdAutomaton> for ACSThresholdAutomaton

Source§

fn from(value: IntervalThresholdAutomaton) -> Self

Converts to this type from the input type.
Source§

impl IsDeclared<Location> for ACSThresholdAutomaton

Source§

fn is_declared(&self, obj: &Location) -> bool

Check if object of type T is declared
Source§

impl IsDeclared<Parameter> for ACSThresholdAutomaton

Source§

fn is_declared(&self, obj: &Parameter) -> bool

Check if object of type T is declared
Source§

impl IsDeclared<Variable> for ACSThresholdAutomaton

Source§

fn is_declared(&self, obj: &Variable) -> bool

Check if object of type T is declared
Source§

impl ThresholdAutomaton for ACSThresholdAutomaton

Source§

type Rule = IntervalTARule

Type of the rules of the threshold automaton
Source§

type InitialVariableConstraintType = IntervalConstraint

Type of the initial variable conditions of the threshold automaton
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 Read more
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 Read more
Source§

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

Get outgoing rules for a location Read more
§

fn has_decrements_or_resets(&self) -> bool

Check whether the threshold automaton contains any decrements or resets
§

fn has_decrements(&self) -> bool

Check whether the threshold automaton contains any decrements
§

fn has_resets(&self) -> bool

Check whether the threshold automaton contains any resets

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> DOTDiff for T
where T: AutomatonEncoding,

§

fn get_dot_diff(&self, other: &T) -> String

Get the difference between two objects in DOT format Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> ToDOT for T
where T: AutomatonEncoding,

§

fn get_dot_graph(&self) -> String

Get the underlying graph in DOT format Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.