Checking correctness of finite state automata designed

149 Views Asked by At

How to check correctness of finite state automata we have designed for a regular expression with the help of any computer program or prolog?

1

There are 1 best solutions below

2
On BEST ANSWER

You can follow the following steps. Each step is meant to be realized by an algorithm, not manually:

  1. Convert the regular expression to a NFA.
  2. Convert the NFA to an equivalent DFA.
  3. If the FSA that you have defined is a NFA, convert it to an equivalent DFA.
  4. Test the two DFAs for equivalence.

Edit: There is an online implementation of the first two steps here.

For step 4 you can look at slides 2-7 here.