Skip to content

Convert DFAs into regular expressions using the transitive closure method in Python 3.

Notifications You must be signed in to change notification settings

anedomansky/dfa-to-reg-exp

Repository files navigation

DFA-to-RegExp

Convert DFAs into regular expressions using the transitive closure method in Python 3.

Use Cases

The programm works best with automatons that have only one initial state and only one final state.

Installation

git clone https://github.com/anedomansky/dfa-to-reg-exp.git

Remove definitions from the ./automaton-definitions OR Add new .xml automaton definition files from AtoCC to the ./automaton-definitions

Usage

cd dfa-to-reg-exp

example script call:

python main.py ./automaton-definitions/automaton_two_states_one_final_book_example.xml

Requirements

  • Python 3 interpreter
  • git
  • AtoCC for creating and exporting the automaton definitions

Creating and exporting automaton definitions

  1. execute the 'Starte AutoEdit.exe'
  2. New
  3. Next
  4. Add alphabet items
  5. Add states (use the default naming e.g. 'q_0') !!!
  6. Design the transition graph
  7. File -> Export -> Automaton Definition XML
  8. Place the created file in `./automaton-definitions/name_of_definition_file.xml

About

Convert DFAs into regular expressions using the transitive closure method in Python 3.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages