Usage: ./dfa-2-mka [-i|-t] [file]
- DFA is obtained via file or via stdin by excluding [file] arg
- Input is checked and parsed to internal DFA structure
- DFA is converted to well specified DFA (if not already)
- State are initially splitted to two groups (classes): * Final States * Non-Final States
- Run until two separate iterations yields the same result:
* For each symbol in alphabet:
- For each class in classes:
- Calculate corresponding group of Final states for given symbol
- If the final states resides within different classes, split the class
- For each class in classes:
- Obtained classes are sorted by length and renamed from 1
- DFA is rebuilt from the original DFA data and calculated classes
- DFA is printed out
Sample input | Output with arg -i |
Output with arg -t |
---|---|---|
1,2,3 1 1,3 1,b,1 1,a,2 2,a,3 2,b,2 3,a,2 3,b,3 |
1,2,3 1 1,3 1,b,1 1,a,2 2,a,3 2,b,2 3,a,2 3,b,3 |
1,2 1 1 1,a,2 1,b,1 2,a,1 2,b,2 |