Click to download
No saved programs
From your computer
Basic UsageAll commands are separated by comma
Declare machine's initial state
initial q0declares q0 as the initial state.
Declare accept state
accept qadeclares qa as the accept state.
Declare reject state (optional)
reject qrdeclares qr as the reject state.
A tuple consists of the following:
- current state
- read symbol (truncated to the first character)
- next state
- write symbol (truncated to the first character)
-1) means left,
1) means right
Q0 a Q1 b rmeans: when you are at state Q0 and you encounter symbol "a" on the tape, switch to state Q1, write "b" on the tape and move right.
Calling one machine from another
You can create multiple machine programs and call the one machine from the other.
- Create a new program with the "New Program" button.
- Declare the machine's initial, accept/reject states and tuples according to your needs.
- Give that program a name e.g. IS_EVEN
- Now, to call IS_EVEN from another machine, use the exec command.
For example, if you want IS_EVEN to be called when you are at state
q1and you read
0you should use
q1 0 exec IS_EVEN.
Specifying parent machine state after child machine executed (optional)You can specify the parent machine state after the child machine has finished execution, depending on whether the child machine accepted or rejected.
For example, the following command executes the machine IS_EVEN and then switches to state Qeven if IS_EVEN has accepted:
q1 0 exec IS_EVEN Qeven
Furthermore, the following command switches to state Qeven if IS_EVEN has accepted or Qodd or if IS_EVEN has rejected:
q1 0 exec IS_EVEN Qeven Qodd
If no states are specified for the accept or reject scenario, the parent machine keeps the last state of the child machine.