private static String generateRandomAutomaton ( Random random ) throws IOException { final Automaton < ? , Integer , ? > automaton ; if ( random . nextBoolean ( ) ) { automaton = RandomAutomata . randomDFA ( random , AUTOMATON_SIZE , INPUT_ALPHABET ) ; } else { automaton = RandomAutomata . randomMealy ( random , AUTOMATON_SIZE , INPUT_ALPHABET , OUTPUT_ALPHABET ) ; } final StringWriter writer = new StringWriter ( ) ; GraphDOT . write ( automaton , INPUT_ALPHABET , writer ) ; return writer . toString ( ) ; }
Generate DOT code for some random automaton .