Module\automaton builder
this tool was created to build data structures easily and run them
Manual:
Camera:
-arrows to move camera
-mouse wheel to zoom in and out
Mouse Modes:
to switch modes click one of the 3 buttons on the bottom left corner
- Select - Select and drag states, selected states can have their Connections edited and deleted if Delete is pressed
- Create - Click to create a new states, press Delete to delete the last state created.
- Change - click a state to change it from a normal state to a win state, to a lose state and back to a normal state q0 cant be changed.
Module modes:
to change modes you need to open the options menu, to open this menu click the top left button on your screen, click the button again if you want to close it.
- manual mode(I know its misspelled in the tool): in this mode when the module is running it will move to the next state only when the space bar is pressed
- pushdown mode: this mode upgrades your automaton to a pushdown automaton, this will enable functions when you connect states see connections pushdown which will allow you to build modules for languages like this L={a^nb^n | n > 0}.
Connections:
To connect states simply right click a state, then left click the state you want it to connect to.
once done that a pop up should show asking you when to pass the connection
fill the filed with the 'letters' that should pass the word to this state and press enter, this is the condition of the connection for example:
state/letter | a | b |
q0 | q1 | q2 |
blue end of connection
red start of connection
Connections can be viewed and edited or deleted on the top right corner, once a state is selected
if your module isn't deterministic manual mode is recommended to follow as the module will check available paths one by one.
Connections pushdown:
if you activated pushdown mode you should see to things change:
- the storage UI should pop up on the top left (this will be important later)
- when you connect states additional options should be unlocked
- you should see a dropdown UI that the its default selected option is "unchanged" this will leave the storage unaffected and the content filled will be ignored. you can also chose "push" or "pop", if "push" is selected you can fill the filled named content with what you want to add to the storage when the condition is met for example if you write A, A will be added to the storage. if you choose "pop" (you don't need to type anything in content but you could for extra readability ) this will remove the top char from the storage example: storage: SA -pop-> storage: S
- there is also a filled named "top storage excepted" if left empty is ignored if filled it would add a condition to the connection for what the top storage could be, for example:
state/letter + top storage | a, A | a, S |
q0 | q1 | q2 |
press the X when finished
Run the module:
to run the module send the 'word' you want to check in the input field at the bottom of the screen.
will the module is running it will display the current path instead of the "path" text.
the state passed to will turn red.
states which might be returned too check a second path if your module isn't deterministic will turn purple. if the state turn yellow that means that your state is missing a connection and it wasn't done checking the word.
the starting state will always be q1.
if you cant follow the module try selecting manual mode in the options menu on the top left.
Status | Released |
Category | Tool |
Platforms | HTML5 |
Author | MitziTheDev |
Made with | Unity |
Leave a comment
Log in with itch.io to leave a comment.