IntervalThresholdAutomaton

Struct IntervalThresholdAutomaton 

Source
pub struct IntervalThresholdAutomaton {
    pub(crate) lia_ta: LIAThresholdAutomaton,
    pub(crate) initial_variable_constraints: Vec<IntervalConstraint>,
    pub(crate) rules: Vec<IntervalTARule>,
    pub(crate) order: StaticIntervalOrder,
    pub order_expr: Vec<BooleanExpression<Parameter>>,
}
Expand description

Threshold automaton with guards abstracted to sets of intervals

A threshold automaton where a specific order on intervals is defined and the guards are abstracted to sets of intervals in which they are enabled.

Fields§

§lia_ta: LIAThresholdAutomaton

Underlying linear integer arithmetic threshold automaton

§initial_variable_constraints: Vec<IntervalConstraint>

Initial variable constraints as intervals

§rules: Vec<IntervalTARule>

Abstract rules of the threshold automaton

§order: StaticIntervalOrder

Current interval order

§order_expr: Vec<BooleanExpression<Parameter>>

Order expression

Implementations§

Source§

impl IntervalThresholdAutomaton

Source

pub fn get_initial_interval<'a>(&'a self, var: &Variable) -> Vec<&'a Interval>

Get the initial interval for variable var

Source

pub fn get_zero_interval<'a>(&'a self, var: &Variable) -> &'a Interval

Get the zero interval for variable var

Source

pub fn get_intervals(&self, var: &Variable) -> &Vec<Interval>

Get intervals for variable var

Source

pub fn get_previous_interval( &self, var: &Variable, i: &Interval, ) -> Option<&Interval>

Get the previous interval of i for variable var

Returns None if i is the first interval

Source

pub fn get_next_interval( &self, var: &Variable, i: &Interval, ) -> Option<&Interval>

Get the next interval of i for variable var

Returns None if i is the open interval

Source

pub fn get_derived_rule(&self, abstract_rule: &IntervalTARule) -> &Rule

Get the corresponding concrete rule for a given abstract rule

Source

pub fn get_interval_constraint( &self, constr: &LIAVariableConstraint, ) -> Result<IntervalConstraint, IntervalConstraintConstructionError>

Translate a [LIAVariableConstraint] into an IntervalConstraint in the interval order of the automaton

This function will return an error if the constraint contains a threshold that was not present when the interval order was constructed

Source

pub fn get_enabled_intervals<'a>( &'a self, constr: &'a IntervalConstraint, var: &Variable, ) -> impl Iterator<Item = &'a Interval>

Get the intervals in which the interval constraint is enabled

Source

pub fn get_variables_constrained( &self, constr: &IntervalConstraint, ) -> Vec<&Variable>

Get all variables for which the interval constraint actually constrains the interval a variable can be in

Source

pub fn get_ta(&self) -> &GeneralThresholdAutomaton

Get the underlying threshold automaton

Source

pub fn get_ordered_intervals( &self, var: &Variable, ) -> Result<&Vec<Interval>, IntervalOrderError<Variable>>

Get the interval order for a specific variable

Returns all intervals for variable var in the interval order of the automaton

Source

pub fn get_helper_vars_for_sumvars( &self, ) -> &HashMap<Variable, WeightedSum<Variable>>

TODO: Remove when interval order is ready

Trait Implementations§

Source§

impl Clone for IntervalThresholdAutomaton

Source§

fn clone(&self) -> IntervalThresholdAutomaton

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 IntervalThresholdAutomaton

Source§

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

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

impl Display for IntervalThresholdAutomaton

Source§

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

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

impl IsDeclared<Location> for IntervalThresholdAutomaton

Source§

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

Check if object of type T is declared
Source§

impl IsDeclared<Parameter> for IntervalThresholdAutomaton

Source§

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

Check if object of type T is declared
Source§

impl IsDeclared<Variable> for IntervalThresholdAutomaton

Source§

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

Check if object of type T is declared
Source§

impl<C: ModelCheckerContext + ProvidesSMTSolverBuilder, SC: TargetSpec> TATrait<C, SC> for IntervalThresholdAutomaton

Source§

type TransformationError = IntervalTATransformationError

Error type that can occur when trying to convert from threshold automaton
Source§

fn try_from_general_ta( ta: GeneralThresholdAutomaton, ctx: &C, spec_ctx: &SC, ) -> Result<Vec<Self>, Self::TransformationError>

Try to derive the internal threshold automaton representation from a general threshold automaton
Source§

impl ThresholdAutomaton for IntervalThresholdAutomaton

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 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
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 = &IntervalConstraint>

Get the initial variable constraints of the threshold automaton
§

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.