MTMS main
Modern Turing Machine Simulator
Loading...
Searching...
No Matches
cli.hpp File Reference

Header definition for the interactive CLI dashboard interface. More...

#include "../core/tm.hpp"
#include <string_view>
Include dependency graph for cli.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int run_cli_session (TuringMachine &machine, std::string_view input_word, bool interactive)
 Executes the simulation via the terminal view layer.
 

Detailed Description

Header definition for the interactive CLI dashboard interface.

Author
wh0crypt (wh0cr.nosp@m.ypt@.nosp@m.proto.nosp@m.n.me)
Version
0.1
Date
2026-06-27

Definition in file cli.hpp.

Function Documentation

◆ run_cli_session()

int run_cli_session ( TuringMachine machine,
std::string_view  input_word,
bool  interactive 
)

Executes the simulation via the terminal view layer.

Parameters
machineThe initialized Multi-Tape Turing Machine engine instance.
input_wordThe raw string sequence to process.
interactiveIf true, steps interactively. If false, executes instantly (batch mode).
Returns
int Exit status code (EXIT_SUCCESS or EXIT_FAILURE).

Definition at line 53 of file cli.cpp.

References TuringMachine::get_current_state(), State::get_label(), State::is_accept(), TuringMachine::load_input(), render_dashboard(), and TuringMachine::step().

Referenced by main().