A professional Python desktop application designed to validate strings using Regular Expressions and provide a live, interactive visual simulation of Deterministic Finite Automata (DFA) state transitions.
Developed as a comprehensive visual implementation of Theory of Automata concepts.
- Regex Validation Engine: Evaluates standard email structures and strict password policies (minimum 8 characters, requiring uppercase, lowercase, and numeric digits).
- Interactive DFA Simulation: Features an animated "flipbook" transition engine with a live Turing-style Input Tape.
- Automata Laboratory Tools:
- Dynamic mathematical Transition Tables generated for each language.
- Manual Playback Controls (Pause, Resume, Step Forward, Step Backward).
- Adjustable simulation execution speeds.
- High-Definition Diagrams: Integrates Graphviz to dynamically generate 300 DPI state machines, embedded within a native PyQt6 canvas supporting zoom and pan.
- Export Capabilities: Generate and save detailed simulation statistics and transition logs to local text files.
- Language: Python 3.x
- GUI Framework: PyQt6
- Automata Engine: Custom Python logic mapping state transition tables
- Visualization: Graphviz, NetworkX
To run this application locally, you must have Python installed, along with the Graphviz system executable.
The application requires the underlying Graphviz software to be installed on your operating system to render the DFA states.
- Windows: Download the 64-bit EXE installer from graphviz.org or run
winget install Graphviz.Graphvizin PowerShell. Crucial: You must check "Add Graphviz to the system PATH" during the installation process. - Linux (Ubuntu/Mint): Run
sudo apt install graphvizin your terminal.
Clone the repository and set up the Python virtual environment:
# Clone the repository
git clone https://github.com/SHADOWRULIN/SmartRegexValidator.git
cd SmartRegexValidator
# Create and activate a virtual environment
python -m venv venv
# On Windows:
venv\Scripts\activate
# On Linux/macOS:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
Before running the simulator for the first time, you must generate the high-resolution animation frames:
# Navigate to the source code folder
cd src
# Generate the DFA diagram assets
python utils/graph_generator.pyLaunch the application:
python main.py
Muhammad Fahaz Khan
- GitHub: @SHADOWRULIN
- LinkedIn: Fahaz Khan