Class ModalTransition<S1,​L1,​S extends State<S1>,​L extends Label<L1>>

  • Type Parameters:
    S1 - generic type of the content of S
    L1 - generic type of the content of L
    S - generic type of the state
    L - generic type of the label

    public class ModalTransition<S1,​L1,​S extends State<S1>,​L extends Label<L1>>
    extends Transition<S1,​L1,​S,​L>
    Class implementing a Modal Transition of an Automaton.
    A modal transition is a transition further equipped with a modality.
    Modalities are either permitted and necessary.
    A permitted transition is controllable.
    Necessary transitions can be either urgent (i.e., uncontrollable) or lazy.
    A lazy transition can be either controllable or uncontrollable according
    to a controllability predicate that predicates over the set of transitions of an automaton.
    Author:
    Davide Basile
    • Constructor Detail

      • ModalTransition

        public ModalTransition​(S source,
                               L label,
                               S target,
                               ModalTransition.Modality type)
        Constructing a modal transition from the source, target states, the label and the modality. The modality must be non-null. Requirements of the constructor of the super-class must hold.
        Parameters:
        source - the source state
        label - the label
        target - the target state
        type - the modality
    • Method Detail

      • isUrgent

        public boolean isUrgent()
        Returns true if the transition is urgent
        Returns:
        true if the transition is urgent
      • isLazy

        public boolean isLazy()
        Returns true if the transition is lazy
        Returns:
        true if the transition is lazy
      • isNecessary

        public boolean isNecessary()
        Returns true if the transition is necessary
        Returns:
        true if the transition is necessary
      • isPermitted

        public boolean isPermitted()
        Returns true if the transition is permitted
        Returns:
        true if the transition is permitted
      • hashCode

        public int hashCode()
        Overrides the method of the object class
        Overrides:
        hashCode in class Transition<S1,​L1,​S extends State<S1>,​L extends Label<L1>>
        Returns:
        the hashcode of this object
      • equals

        public boolean equals​(Object obj)
        Overrides the method of the object class
        Overrides:
        equals in class Transition<S1,​L1,​S extends State<S1>,​L extends Label<L1>>
        Parameters:
        obj - the other object to compare to
        Returns:
        true if the two objects are equal
      • isUncontrollable

        public boolean isUncontrollable​(Set<? extends ModalTransition<S1,​Action,​S,​CALabel>> tr,
                                        Set<State<S1>> badStates,
                                        java.util.function.BiPredicate<ModalTransition<S1,​Action,​S,​CALabel>,​ModalTransition<S1,​L1,​S,​L>> controllabilityPred)
        Returns true if the transition is uncontrollable. An urgent transition is uncontrollable, a permitted transition is not uncontrollable. A lazy transition is uncontrollable if and only if none of the pairs formed by this transition and a transition t belonging to tr satisfies the controllability predicate, where t must be a match and the source state of t must not be contained in the set badStates.
        Parameters:
        tr - the set of transitions to check
        badStates - the set of badstates to check
        controllabilityPred - the controllability predicate
        Returns:
        true if the transition is uncontrollable