This is a finite automaton simulator developed in Haskell with a graphical interface using the GTK library. The simulator is capable of checking whether an input string is accepted by a deterministic finite automaton (DFA) or nondeterministic finite automaton (NFA).
- Creation of deterministic and nondeterministic finite automata
- Verification of string acceptance by automata
- User-friendly graphical interface for entering states, alphabet, transitions, and input strings
Make sure you have the following tool installed on your system:
- GHC: The haskell compiler should be installed to be able to compile the code.
IF you want to use the graphical interface:
- GTK: The GTK library should be installed to compile and run the program with the graphical interface.
- Clone this repository to your system:
git clone https://github.com/ric-amorim/AutomatonSimulator.git
- Navigate to the project directory:
cd AutomatonSimulator
-
Choose if you want to use the program in the terminal or the interface:
If you want to use the terminal:
./terminal.sh
If you want to use the interface:
./gui.sh
-
Fill in the input fields with the automaton details:
Automaton Type (DFA or NFA)
States
Alphabet
Transitions in the format "(state, symbol, next_state)" (To use the Epsilon use the letter E) Ex: (state,E,next_state).
Initial State
Accept States -
Input the test string and wait for the result. (To input an empty string use: _ ).
Contributions are welcome! If you wish to contribute to this project by adding features, fixing bugs, or enhancing the interface, please feel free to open an issue or submit a pull request. Your contributions will be greatly appreciated!