Class SubsequentialTransducers

java.lang.Object
net.automatalib.util.automaton.transducer.SubsequentialTransducers

public final class SubsequentialTransducers extends Object
Utility methods of SubsequentialTransducers.
  • Method Details

    • toOnwardSST

      public static <S, I, T, O, A extends MutableSubsequentialTransducer<S, I, T, O>> A toOnwardSST(SubsequentialTransducer<?,I,?,O> sst, Collection<? extends I> inputs, A out)
      Constructs a new onward subsequential transducer for a given SST. In an onward SST, for each state except the initial state, the longest common prefix over the state output and the outputs of all outgoing transitions of a state is epsilon. This can be achieved by pushing back the longest common prefix to the transition outputs of the incoming transitions of each state.
      Type Parameters:
      S - state type (of the output SST)
      I - input symbol type
      T - transition type (of the output SST)
      O - output symbol type
      A - automaton type
      Parameters:
      sst - the original SST
      inputs - the alphabet symbols to consider for this transformation
      out - the target automaton to write the onward form to
      Returns:
      out, for convenience
    • toOnwardSST

      public static <S, I, T, O, A extends MutableSubsequentialTransducer<S, I, T, O>> A toOnwardSST(SubsequentialTransducer<?,I,?,O> sst, Collection<? extends I> inputs, A out, boolean minimize)
      Constructs a new onward subsequential transducer for a given SST. In an onward SST, for each state except the initial state, the longest common prefix over the state output and the outputs of all outgoing transitions of a state is epsilon. This can be achieved by pushing back the longest common prefix to the transition outputs of the incoming transitions of each state.
      Type Parameters:
      S - state type (of the output SST)
      I - input symbol type
      T - transition type (of the output SST)
      O - output symbol type
      A - automaton type
      Parameters:
      sst - the original SST
      inputs - the alphabet symbols to consider for this transformation
      out - the target automaton to write the onward form to
      minimize - a flag indicating whether the final result should be minimized
      Returns:
      out, for convenience
    • isOnwardSST

      public static <S, I, O> boolean isOnwardSST(SubsequentialTransducer<S,I,?,O> sst, Collection<? extends I> inputs)
      Checks whether a given SubsequentialTransducer is onward, i.e. if for each state (sans initial state) the longest common prefix over its state property and the transition properties of its outgoing edges equals epsilon.
      Type Parameters:
      S - state type
      I - input symbol type
      O - output symbol type
      Parameters:
      sst - the SST to check
      inputs - the input symbols to consider for this check
      Returns:
      true if sst is onward, false otherwise