Microsoft.Automata.Rex.RexEngine.GenerateMember C# (CSharp) Méthode

GenerateMember() public méthode

Gets the random seed of the generator Generates a random member accepted by fa. Assumes that fa has no dead states, or else termination is not guaranteed.
public GenerateMember ( Automaton fa ) : string
fa Automaton
Résultat string
        public string GenerateMember(Automaton<BDD> fa)
        {
            var sb = new System.Text.StringBuilder();
            int state = fa.InitialState;
            while (!fa.IsFinalState(state) || (fa.OutDegree(state) > 0 && chooser.ChooseTrueOrFalse()))
            {
                var move = fa.GetNthMoveFrom(state, chooser.Choose(fa.GetMovesCountFrom(state)));
                if (!move.IsEpsilon)
                    sb.Append((char)(solver.Choose(move.Label)));
                state = move.TargetState;
            }
            return sb.ToString();
        }