Class ProcessorTransition

  • All Implemented Interfaces:
    ca.uqac.lif.cep.Duplicable

    public class ProcessorTransition
    extends MooreMachine.Transition
    Represents a transition in the Moore machine. Using this transition actually creates a generalized Moore machine, as the labels on each transition are themselves processors: not only can they express complex conditions on the input event, but they can also have a state. This was done mainly because it was handy to just use the class Processor to evaluate conditions (send the event to the processor and just collect its output), rather than come up with special objects to do that.

    A "classical" Moore machine is a particular case where all processors for expressing the conditions are unary and stateless.

    Author:
    Sylvain Hallé
    • Constructor Detail

      • ProcessorTransition

        public ProcessorTransition​(ProcessorTransition pt)
        Creates a new processor transition from another transition.
        Parameters:
        pt - The transition to copy from
      • ProcessorTransition

        public ProcessorTransition​(ProcessorTransition pt,
                                   boolean with_state)
        Creates a new processor transition, by copying state from another transition.
        Parameters:
        pt - The transition to copy from
        with_state - The
      • ProcessorTransition

        public ProcessorTransition​(int destination,
                                   ca.uqac.lif.cep.Processor condition)
        Instantiates a new transition
        Parameters:
        condition - The condition for taking that transition
        destination - The state one will be in if the condition evaluates to true
    • Method Detail

      • isFired

        public boolean isFired​(java.lang.Object[] inputs,
                               ca.uqac.lif.cep.Context context)
        Description copied from class: MooreMachine.Transition
        Determines if the transition fires for the given input
        Overrides:
        isFired in class MooreMachine.Transition
        Parameters:
        inputs - The input events
        context - The context for the evaluation
        Returns:
        true if the transition fires, false otherwise
      • toString

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