Class RandomAutomata


  • public final class RandomAutomata
    extends Object
    • Method Detail

      • randomICDFA

        public static <I> CompactDFA<I> randomICDFA​(Random rand,
                                                    @org.checkerframework.checker.index.qual.NonNegative int numStates,
                                                    Alphabet<I> inputs,
                                                    boolean minimize)
        Randomly generates an initially connected DFA (ICDFA), i.e., a DFA where all states are reachable from the initial state.
        Parameters:
        rand - the randomness source
        numStates - the number of states of the generated automaton
        inputs - the input alphabet
        minimize - determines whether the DFA will be minimized before being returned. Note that if true is passed for this parameter, the resulting automaton might have a size less than numStates
        Returns:
        a randomly generated ICDFA
      • randomOneSEVPA

        public static <I> DefaultOneSEVPA<I> randomOneSEVPA​(Random r,
                                                            int locCount,
                                                            VPAlphabet<I> alphabet,
                                                            double acceptanceProb,
                                                            double initialRetTransProb,
                                                            boolean minimize)
      • randomDeterministic

        public static <S,​I,​T,​SP,​TP,​A extends MutableDeterministic<S,​I,​T,​SP,​TP>> A randomDeterministic​(Random rand,
                                                                                                                                                            @org.checkerframework.checker.index.qual.NonNegative int numStates,
                                                                                                                                                            Collection<? extends I> inputs,
                                                                                                                                                            Collection<? extends SP> stateProps,
                                                                                                                                                            Collection<? extends TP> transProps,
                                                                                                                                                            A out)
      • randomDeterministic

        public static <S,​I,​T,​SP,​TP,​A extends MutableDeterministic<S,​I,​T,​SP,​TP>> A randomDeterministic​(Random rand,
                                                                                                                                                            @org.checkerframework.checker.index.qual.NonNegative int numStates,
                                                                                                                                                            Collection<? extends I> inputs,
                                                                                                                                                            Collection<? extends SP> stateProps,
                                                                                                                                                            Collection<? extends TP> transProps,
                                                                                                                                                            A out,
                                                                                                                                                            boolean minimize)
      • randomDFA

        public static <I> CompactDFA<I> randomDFA​(Random rand,
                                                  @org.checkerframework.checker.index.qual.NonNegative int numStates,
                                                  Alphabet<I> inputs,
                                                  boolean minimize)
      • randomDFA

        public static <I> CompactDFA<I> randomDFA​(Random rand,
                                                  @org.checkerframework.checker.index.qual.NonNegative int numStates,
                                                  Alphabet<I> inputs)
      • randomMealy

        public static <I,​O> CompactMealy<I,​O> randomMealy​(Random rand,
                                                                      @org.checkerframework.checker.index.qual.NonNegative int numStates,
                                                                      Alphabet<I> inputs,
                                                                      Collection<? extends O> outputs,
                                                                      boolean minimize)
      • randomMealy

        public static <I,​O> CompactMealy<I,​O> randomMealy​(Random rand,
                                                                      @org.checkerframework.checker.index.qual.NonNegative int numStates,
                                                                      Alphabet<I> inputs,
                                                                      Collection<? extends O> outputs)
      • randomMoore

        public static <I,​O> CompactMoore<I,​O> randomMoore​(Random rand,
                                                                      @org.checkerframework.checker.index.qual.NonNegative int numStates,
                                                                      Alphabet<I> inputs,
                                                                      Collection<? extends O> outputs,
                                                                      boolean minimize)
      • randomMoore

        public static <I,​O> CompactMoore<I,​O> randomMoore​(Random rand,
                                                                      @org.checkerframework.checker.index.qual.NonNegative int numStates,
                                                                      Alphabet<I> inputs,
                                                                      Collection<? extends O> outputs)