Ejemplo n.º 1
0
 private bool Validate()
 {
     return(!(Initial is null) &&
            AcceptStates.Length != 0 &&
            States.Length != 0 &&
            States.Contains(Initial) &&
            AcceptStates.Aggregate(true,
                                   (acc, s) => acc && States.Contains(s)) &&
            States.Aggregate(true,
                             (acc, s) => acc && s.Transitions.Keys.SequenceEqual(Alphabet)));
 }