A Python GUI application to design, analyze, and simulate finite automata (DFA/NFA).
- Object-oriented model with classes for State, Transition, Alphabet, and Automaton
- Visual creation and editing of automata with support for initial and final states
- Full automata management (save, load, delete, rename)
- User-friendly interface to manipulate all aspects of automata
- Interactive visualization of automata as graphs
- Step-by-step animation of word processing
- Export visualizations as PNG/SVG images for documentation or presentations
- Check if an automaton is deterministic, complete, or minimal
- Analyze fundamental properties of automata
- Automatic transformation of automata (determinization, completion, minimization)
- Operations between automata (union, intersection, equivalence checking)
- Test if a word is accepted by an automaton
- Animate the automaton's traversal with the option to save animations
- Process words with step-by-step visualization of transitions
- Generate all accepted words up to a given length
- Statistics on recognized languages (number of words accepted by length)
- Python 3.6 or higher
- PyQt5
- NetworkX
- Matplotlib
pip install PyQt5 networkx matplotlib- Clone or download this repository
- Navigate to the project directory
- Run the application:
python main.py- Click on the "Editor" tab
- Click the "New" button
- Enter a name for the automaton
- Add symbols to the alphabet using the "Add Symbol" button
- Add states using the "Add State" section (check "Initial" or "Final" as needed)
- Add transitions by selecting the source state, symbol, and target state
- Click "Save" to save the automaton in the "Automates" directory that will be created
- Go to the "Automata" tab
- Select an automaton from the list or use the "Load" button to load from a file
- The automaton will be displayed in the visualization panel
- Load an automaton
- Go to the "Analysis" tab
- The automaton's properties will be displayed at the top
- Use the transformation buttons to convert to DFA, minimize, etc.
- Use the "Visualize Result" button to see the transformed automaton
- Use "Save Result as New Automaton" to save the result
- Load an automaton
- Go to the "Word Processing" tab
- Enter a word in the input field
- Click "Test Word" to check if the word is accepted
- Click "Animate Processing" to see the step-by-step visualization
- Load an automaton
- Go to the "Word Processing" tab
- Set the maximum length for generated words
- Click "Generate Words" to list all accepted words up to that length
automata/: Base classes for automata representationstate.py: State classalphabet.py: Alphabet classtransition.py: Transition classautomaton.py: Automaton class with algorithms
gui/: GUI componentsmain_window.py: Main application windowautomaton_tab.py: Tab for listing and loading automataeditor_tab.py: Tab for creating and editing automataanalysis_tab.py: Tab for analyzing and transforming automataword_processing_tab.py: Tab for word processing and language operations
utils/: Utility functionsvisualization.py: Functions for visualizing automata
Automates/: Directory to store automata JSON filesmain.py: Application entry point


