- Notifications
You must be signed in to change notification settings - Fork0
A full-stack web application that allows users to define a Deterministic Finite State Machine (DFSM), simulate input strings, and generate a visual PDF representation of the DFA.
mobasith/Simulation-of-DFSM
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A full-stack web application that allows users to define aDeterministic Finite State Machine (DFA), simulate input strings against it, and generate avisual PDF representation of the DFA. Built usingAngular andFastAPI, with DFA logic powered byautomata-lib.
- Define DFA (states, alphabet, transitions, start/accept states)
- Input a string and check if it's accepted
- Visualize the DFA structure as a downloadable PDF
- Practical tool for automata theory
- Frontend: Angular 17+
- Backend: FastAPI (Python 3.10+)
- DFA logic: automata-lib v1.0.0
- Visualization: reportlab, matplotlib
- Navigate to backend:
cd backend - Create and activate virtual environment:
python -m venv venv
source venv/bin/activate
On Windows: venv\Scripts\activate
Install dependencies:
pip install -r requirements.txt
Install Graphviz (Required for PDF output):
- Linux/macOS:
sudo apt install graphviz
- Windows:Download fromhttps://graphviz.org/download/
- Linux/macOS:
Run the FastAPI server:
uvicorn main:app --reload
- Navigate to frontend folder:
cd Angular_frontend - Install dependencies:
npm install
- Run the frontend app:
ng serve
Visit:http://localhost:4200
- Backend (requirements.txt):
- annotated-types==0.7.0
- anyio==4.9.0
- automata-lib==9.0.0
- cached_method==0.1.0
- charset-normalizer==3.4.2
- click==8.2.1
- colorama==0.4.6
- contourpy==1.3.2
- cycler==0.12.1
- fastapi==0.115.14
- fonttools==4.58.5
- frozendict==2.4.6
- graphviz==0.21
- h11==0.16.0
- idna==3.10
- kiwisolver==1.4.8
- matplotlib==3.10.3
- networkx==3.5
- numpy==2.3.1
- packaging==25.0
- pillow==11.3.0
- pydantic==2.11.7
- pydantic_core==2.33.2
- pyparsing==3.2.3
- python-dateutil==2.9.0.post0
- reportlab==4.4.2
- six==1.17.0
- sniffio==1.3.1
- starlette==0.46.2
- typing-inspection==0.4.1
- typing_extensions==4.14.1
- uvicorn==0.35.0
- Frontend (Angular v17+):
- Angular CLI v17
- RxJS v7+
- TypeScript v5+
States: q0,q1,q2
Alphabet: 0,1
Start State: q0
Accept States: q2
Input String: 010
Transitions:
- q0,0,q1
- q0,1,q0
- q1,0,q1
- q1,1,q2
- q2,0,q2
- q2,1,q2
String verdict: Accepted ✅ or Rejected ❌
DFA PDF: Downloadable file from /pdf/dfa_output.pdf
Mohammed Basith📫 LinkedIn:www.linkedin.com/in/mohammed-basith-97326321b
About
A full-stack web application that allows users to define a Deterministic Finite State Machine (DFSM), simulate input strings, and generate a visual PDF representation of the DFA.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.