https://github.com/bkosm/finite-automaton-generator
Command line tool for generating JFLAP files containing random FA's.
https://github.com/bkosm/finite-automaton-generator
finite-automata jflap python
Last synced: 3 months ago
JSON representation
Command line tool for generating JFLAP files containing random FA's.
- Host: GitHub
- URL: https://github.com/bkosm/finite-automaton-generator
- Owner: bkosm
- Created: 2019-10-27T19:37:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-05T20:45:00.000Z (over 5 years ago)
- Last Synced: 2025-01-14T14:32:32.975Z (5 months ago)
- Topics: finite-automata, jflap, python
- Language: Python
- Size: 35.2 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Finite Automata Generator
Command line tool for generating JFLAP '.jff' files containing random FA's.
```
usage: fa_generator.py [-h] [-n N] [-fs N] [-a [A [A ...]]] [-fn xxx.jff]
[--interesting]Generate a finite automata
optional arguments:
-h, --help show this help message and exit
-n N Number of states
-fs N Number of final states
-a [A [A ...]] List of possible words to consume on hops
-fn xxx.jff Output XML filename
--interesting Generate an example with a more interesting accepted word
```
# Converter
Command line tool for translating simple automatas from XML files into GraphViz and vice versa.
```
usage: converter.py [-h] [-ox xxx.(xml|jff)] [-og xxx.gv] input_file.extConvert xml described automatas to graphviz and vice versa
positional arguments:
input_file.ext Input filenameoptional arguments:
-h, --help show this help message and exit
-ox xxx.(xml|jff) Output xml filename
-og xxx.gv Output graphviz filename
```
### Converter note
- GraphViz files are required to have each edge labeled with an accepted word.
- GraphViz graph's initial node is distinguished by being pointed at by a dot labeled "q".Example convertable file below:
```ex.gv
digraph ex {
q -> q0 // initial node
q0 -> q1 [label= "abc"]; // labeled edge
q [shape=point] // initial node pointer
q1 [shape=doublecircle] // final node indicator
}
```> Bartosz Kosmala 2019