Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bl33h/automatagenerator
This Python tool transforms NFAs to DFAs, minimizes DFAs, and converts regular expressions to NFAs.
https://github.com/bl33h/automatagenerator
algorithm automata-simulator computing-theory dfa dfa-minimization nfa nfa-minimization nfa-to-dfa-conversion postfix regex shunting-yard-algorithm
Last synced: about 1 month ago
JSON representation
This Python tool transforms NFAs to DFAs, minimizes DFAs, and converts regular expressions to NFAs.
- Host: GitHub
- URL: https://github.com/bl33h/automatagenerator
- Owner: bl33h
- License: mit
- Created: 2023-08-24T01:15:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-28T04:39:17.000Z (about 1 year ago)
- Last Synced: 2023-11-28T05:29:51.474Z (about 1 year ago)
- Topics: algorithm, automata-simulator, computing-theory, dfa, dfa-minimization, nfa, nfa-minimization, nfa-to-dfa-conversion, postfix, regex, shunting-yard-algorithm
- Language: Python
- Homepage:
- Size: 63.5 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# atomataGenerator
This project provides a Python-based tool for converting Non-Deterministic Finite Automata (NFA) to Deterministic Finite Automata (DFA) and subsequently minimizing the resulting DFA. It also includes functionality for converting regular expressions to NFAs.
Files •
Features •
How To Use## Files
- **afn2afd.py:**
- Contains the NFA to DFA converter class.
- **main.py:**
- The main application file that orchestrates the entire process, including input processing, NFA to DFA conversion, and minimization.- **minAFD.py:**
- Implements the AFDMinimizer class responsible for DFA minimization.
- **regex2afn.py:**
- Defines the Regex2AFNConverter class for converting regular expressions to NFAs.- **regexToPostfix.py:**
- Implements the Shunting Yard algorithm for converting regular expressions to postfix notation.## Features
The main features of the application include:
- Regex to NFA Conversion:
- Converts a postfix regular expression into a Non-deterministic Finite Automaton (NFA).
- Utilizes the Shunting Yard algorithm for parsing and evaluating postfix expressions.
- Generates NFA states, transitions, and handles epsilon (ε) transitions.
- NFA to DFA Conversion:
- Converts the Non-deterministic Finite Automaton (NFA) into a Deterministic Finite Automaton (DFA).
- Computes epsilon closures and minimizes the number of states in the DFA.
- Allows for processing input strings and determining their acceptance based on the DFA.
- DFA Minimization:
- Minimizes the Deterministic Finite Automaton (DFA) to reduce the number of states while preserving language recognition.
- Implements the Shunting Yard algorithm to evaluate regular expressions and convert them to postfix notation.- Readable Output:
- Provides clear and structured output, including information on states, symbols, transitions, the start state, and accept states.
- Enables easy interpretation of automaton components for debugging and analysis.## How To Use
To clone and run this application, you'll need [Git](https://git-scm.com) and [Python](https://www.python.org/downloads/) installed on your computer. From your command line:```bash
# Clone this repository
$ git clone https://github.com/bl33h/automataGenerator# Open the folder
$ cd src# Run de app
$ python main.py
```