public bool AcceptString(string input) { if (characters == null || states.Count == 0 || transitions.Count == 0) { throw new InvalidOperationException("Automaton is not completed."); } foreach (char character in input) { if (!IsInAlphabet(character)) { throw new ArgumentException("Character is not in the alphabet."); } } AutomatonFromViewModel(); return(automaton.AcceptString(input)); }