pub struct IntervalTARule {
pub(crate) id: u32,
pub(crate) source: Location,
pub(crate) target: Location,
pub(crate) guard: IntervalConstraint,
pub(crate) actions: Vec<IntervalTAAction>,
}Expand description
Interval abstracted rule
Rule of the abstract threshold automaton with an interval guard
Fields§
§id: u32Id assigned to the rule in the specification
source: LocationSource location of the rule
target: LocationTarget location of the rule
guard: IntervalConstraintGuard of the rule
actions: Vec<IntervalTAAction>Effect of the rule
Implementations§
Source§impl IntervalTARule
impl IntervalTARule
Sourcepub fn new(
id: u32,
source: Location,
target: Location,
guard: IntervalConstraint,
effect: Vec<IntervalTAAction>,
) -> IntervalTARule
pub fn new( id: u32, source: Location, target: Location, guard: IntervalConstraint, effect: Vec<IntervalTAAction>, ) -> IntervalTARule
Creates a new abstract Rule for testing purposes
Sourcepub fn updates_variable(&self, var: &Variable) -> bool
pub fn updates_variable(&self, var: &Variable) -> bool
Check if the rule updates the given variable
Sourcepub fn get_guard(&self) -> &IntervalConstraint
pub fn get_guard(&self) -> &IntervalConstraint
Returns the guard of the rule
Sourcepub fn is_enabled(
&self,
state: &IntervalState<Variable>,
) -> Result<bool, IntervalOrderError<Variable>>
pub fn is_enabled( &self, state: &IntervalState<Variable>, ) -> Result<bool, IntervalOrderError<Variable>>
Check whether the rule is enabled in the given state
Sourcepub(crate) fn from_lia_rule<O: IntervalOrderFor<Variable> + IntervalOrderFor<WeightedSum<Variable>>>(
rule: &LIARule,
order: &O,
) -> IntervalTARule
pub(crate) fn from_lia_rule<O: IntervalOrderFor<Variable> + IntervalOrderFor<WeightedSum<Variable>>>( rule: &LIARule, order: &O, ) -> IntervalTARule
Derive an interval rule from a rule of a linear integer arithmetic rule given a fixed order
Trait Implementations§
Source§impl Clone for IntervalTARule
impl Clone for IntervalTARule
Source§fn clone(&self) -> IntervalTARule
fn clone(&self) -> IntervalTARule
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IntervalTARule
impl Debug for IntervalTARule
Source§impl Display for IntervalTARule
impl Display for IntervalTARule
Source§impl Hash for IntervalTARule
impl Hash for IntervalTARule
Source§impl PartialEq for IntervalTARule
impl PartialEq for IntervalTARule
Source§impl RuleDefinition for IntervalTARule
impl RuleDefinition for IntervalTARule
Source§type Action = IntervalTAAction
type Action = IntervalTAAction
Type of the actions of the rule
Source§type Guard = IntervalConstraint
type Guard = IntervalConstraint
Type of the guard of the rule
Source§fn actions(&self) -> impl Iterator<Item = &Self::Action>
fn actions(&self) -> impl Iterator<Item = &Self::Action>
Returns the actions of the rule Read more
§fn has_decrements(&self) -> bool
fn has_decrements(&self) -> bool
Check whether the rule has a decrement action
§fn has_resets(&self) -> bool
fn has_resets(&self) -> bool
Check whether the rule has a reset action
impl Eq for IntervalTARule
impl StructuralPartialEq for IntervalTARule
Auto Trait Implementations§
impl Freeze for IntervalTARule
impl RefUnwindSafe for IntervalTARule
impl Send for IntervalTARule
impl Sync for IntervalTARule
impl Unpin for IntervalTARule
impl UnwindSafe for IntervalTARule
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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 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>
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