Skip to content

Add an interactive mode - #6

Merged
QuickWrite merged 5 commits into
mainfrom
feat/interactive-mode
Nov 30, 2026
Merged

QuickWrite merged 5 commits into
mainfrom
feat/interactive-mode

Conversation

@QuickWrite

@QuickWrite QuickWrite commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

The application now receives a flag --interactive which lets the program prompt the user after every iteration on what should be done:

$ ./tau my-awesome-program.tau --interactive
Execution sequence:

State: HELLO
..., 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
                 ^
                 Hello

(n)ext, (h)alt: 

If the user provides n, the machine continues to the next iteration and if the user provides h, the machine automatically stops.

If the max-iter are reached, the user can choose to either continue or halt as well:

Error: Maximum iterations reached: 10. (c)ontinue + reset counter, (h)alt: 

In this case the user must provide the characters c or h.

This allows for a better understanding what the Turing Machine actually does.

Closes #4

The program now also includes an interactive mode which can be activated
using the --interactive.
It prompts the user after every iteration on what should be done.
The prompt of the user is not part of the actual output. As such it
should normally be in stderr.
@QuickWrite QuickWrite self-assigned this Nov 29, 2026
@QuickWrite QuickWrite added the enhancement New feature or request label Nov 29, 2026
@QuickWrite QuickWrite linked an issue Nov 29, 2026 that may be closed by this pull request
The interactive mode also has to be documented inside of the LaTeX
document for the user.
If the max iterations are reached, it is probably sensible to let the
user decide if they want to continue.
As such the user gets prompted in this specific case.
Comment thread docs/sections/flags.tex Resolved
@QuickWrite
QuickWrite merged commit c23575c into main Nov 30, 2026
4 checks passed
@QuickWrite
QuickWrite deleted the feat/interactive-mode branch November 30, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add interactive mode

1 participant