Class FSM


  • public class FSM
    extends java.lang.Object
    Deterministic Finite Acyclic graph.
    Version:
    4.7
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.util.Set<FSMState> allStates
      It specifies all states including the initial one and final ones.
      java.util.Set<FSMState> finalStates
      It specifies final states of DFA.
      (package private) static java.util.concurrent.atomic.AtomicInteger idNumber
      It specifies number of states created in DFA class.
      FSMState initState
      It specifies the intial state of DFA.
    • Constructor Summary

      Constructors 
      Constructor Description
      FSM()
      It creates a Finite State Machine used by Regular constraint constructor.
      FSM​(FSMState initState, java.util.Set<FSMState> finalStates, java.util.Set<FSMState> allStates)
      It creates a Finite State Machine.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FSM concatenation​(FSM other)
      It does concatenation of two FSM.
      FSMState getState​(int id)
      It gets state of a given id.
      private void recursiveCall​(int prevSuc, int level, int stateNumber, IntervalDomain[][][] outarc, int[] tuple, java.util.List<int[]> tuples)  
      private void recursiveCall​(int prevSuc, int level, int stateNumber, IntervalDomain[][][] outarc, int[] tuple, MDD result)  
      void resize()
      It resizes the Finite State Machine.
      FSM star()
      It performs star operation on this FSM.
      java.lang.String toString()  
      MDD transformDirectlyIntoMDD​(IntVar[] vars)
      It generates one by one tuples allowed by a Regular constraint, which are added to the MDD being built.
      MDD transformIntoMDD​(IntVar[] vars)
      It generates one by one tuples allowed by a Regular constraint, which are added to the MDD being built.
      int[][] transformIntoTuples​(IntVar[] vars)
      It creates an array of tuples representing this Regular context.
      FSM union​(FSM other)
      It computes a union of two Finite State Machines.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • idNumber

        static java.util.concurrent.atomic.AtomicInteger idNumber
        It specifies number of states created in DFA class.
      • initState

        public FSMState initState
        It specifies the intial state of DFA.
      • finalStates

        public java.util.Set<FSMState> finalStates
        It specifies final states of DFA.
      • allStates

        public java.util.Set<FSMState> allStates
        It specifies all states including the initial one and final ones.
    • Constructor Detail

      • FSM

        public FSM​(FSMState initState,
                   java.util.Set<FSMState> finalStates,
                   java.util.Set<FSMState> allStates)
        It creates a Finite State Machine.
        Parameters:
        initState - it specifies the initial state.
        allStates - it specifies all the states.
        finalStates - it specifies the final states.
      • FSM

        public FSM()
        It creates a Finite State Machine used by Regular constraint constructor.
    • Method Detail

      • union

        public FSM union​(FSM other)
        It computes a union of two Finite State Machines.
        Parameters:
        other - the other FSM which is used in the union computation.
        Returns:
        the resulting FSM.
      • concatenation

        public FSM concatenation​(FSM other)
        It does concatenation of two FSM.
        Parameters:
        other - the FSM with which the concatenation takes place.
        Returns:
        the resulting FSM.
      • star

        public FSM star()
        It performs star operation on this FSM.
        Returns:
        the resulting FSM.
      • getState

        public FSMState getState​(int id)
        It gets state of a given id.
        Parameters:
        id - the id of the searched state.
        Returns:
        the state of FSM with a given id.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • resize

        public void resize()
        It resizes the Finite State Machine. All states get a new id between 0..n-1, where n is the number of states.
      • transformIntoTuples

        public int[][] transformIntoTuples​(IntVar[] vars)
        It creates an array of tuples representing this Regular context. It generates only the tuples which are allowed in the current context of the store.
        Parameters:
        vars - variables in which context a list of tuples is created.
        Returns:
        an array of tuples.
      • recursiveCall

        private void recursiveCall​(int prevSuc,
                                   int level,
                                   int stateNumber,
                                   IntervalDomain[][][] outarc,
                                   int[] tuple,
                                   java.util.List<int[]> tuples)
      • transformIntoMDD

        public MDD transformIntoMDD​(IntVar[] vars)
        It generates one by one tuples allowed by a Regular constraint, which are added to the MDD being built. After all tuples are added MDD is being reduced. The standard MDD creating procedure employed in paper presenting MDD based extensional constraint. It generates only the tuples which are allowed in the current context of the store.
        Parameters:
        vars - variables in which context MDD is being created from Regular constraint.
        Returns:
        MDD representing the same constraint as Regular.
      • recursiveCall

        private void recursiveCall​(int prevSuc,
                                   int level,
                                   int stateNumber,
                                   IntervalDomain[][][] outarc,
                                   int[] tuple,
                                   MDD result)
      • transformDirectlyIntoMDD

        public MDD transformDirectlyIntoMDD​(IntVar[] vars)
        It generates one by one tuples allowed by a Regular constraint, which are added to the MDD being built. After all tuples are added MDD is being reduced. The standard MDD creating procedure employed in paper presenting MDD based extensional constraint. It generates only the tuples which are allowed in the current context of the store.
        Parameters:
        vars - variables in which context MDD is being created from Regular constraint.
        Returns:
        MDD representing the same constraint as Regular.