This is a Python-based Finite Automata Tool that allows you to work with Deterministic Finite Automata (DFA) and Non-deterministic Finite Automata (NFA). You can create, manipulate, and visualize automata, as well as perform various operations on them. This tool provides an interactive command-line interface and includes a web-based visualization component.
- Create and manipulate DFA and NFA.
- Set the alphabet for the automaton.
- Add states and transitions to the automaton.
- Test strings to determine if they are accepted or rejected by the automaton.
- Convert NFA to DFA.
- Visualize automaton using a web-based graphical representation.
- Python 3.x
- The
vis-network
JavaScript library for visualization (included in the project).
-
Clone the repository to your local machine:
git clone <repository_url>
-
Ensure you have Python 3.x installed.
-
Open the project directory in your terminal.
-
Run the following command to start the Finite Automata Tool:
python main.py
-
Set the alphabet for the automaton.
-
Choose whether to create a DFA or an NFA.
-
Add states and transitions to the automaton.
-
Test strings to determine their acceptance.
-
Optionally, convert an NFA to a DFA.
-
Visualize the automaton using the web-based graphical representation.
-
You can also check if a DFA is valid (all transitions are defined for each state).
-
Exit the tool when done.
main.py
: Contains the Python code for the Finite Automata Tool.plot.html
: Provides the web-based visualization component for automata.
Automata created or manipulated using this tool can be visualized by opening the plot.html
file in a web browser after running the tool. The visualization updates automatically when you perform operations on the automaton.
- Hashem Sanaei ([email protected])
- vis-network for the JavaScript library used for automaton visualization.
- Any additional acknowledgments or credits.