32 "==================================================\n"
33 " MODERN TURING MACHINE SIMULATOR (mtms) \n"
34 "==================================================\n"
35 " Current State : [{}]\n"
36 " Steps Executed: {}\n"
37 "--------------------------------------------------\n\n",
44 for (std::size_t i = 0; i < tapes.size(); ++i)
46 std::println(
" [Tape {}] ", i);
47 tapes[i].print(std::cout);
50 std::println(
"==================================================");
60 "\n\033[1;31m[!] Input string contains symbols outside the validation alphabet."
71 std::print(
"\n Press [ENTER] to initialize computation step sequences...");
74 while (machine.
step())
77 std::print(
"\n Press [ENTER] to advance execution ticks...");
82 std::print(
"\n Execution Halted. ");
86 ?
"\033[1;32m[STRING ACCEPTED]\033[0m"
87 :
"\033[1;31m[STRING REJECTED / HALT CRASH]\033[0m"
89 std::println(
"==================================================");
94 while (machine.
step())
102 "STATUS=ACCEPTED;STEPS={};FINAL_STATE={}",
110 "STATUS=REJECTED;STEPS={};FINAL_STATE={}",
std::string_view get_label() const noexcept
Getter for the state's unique label.
bool is_accept() const noexcept
Checks if this state is an accepting (final) state.
The central execution engine representing a deterministic Multi-Tape Turing Machine.
bool step() noexcept(false)
Executes a single computational transition step across all parallel tapes.
bool load_input(std::string_view input) noexcept(false)
Validates an input word against the input alphabet and loads it onto Tape 0.
const std::vector< Tape > & get_tapes() const noexcept
Retrieves the entire collection layout of parallel tape tracks.
const State & get_current_state() const noexcept
Retrieves the active operational state context marker.
int run_cli_session(TuringMachine &machine, std::string_view input_word, bool interactive)
Executes the simulation via the terminal view layer.
void clear_viewport()
Flushes the active terminal frame using standard ANSI escape codes.
void render_dashboard(const TuringMachine &machine, int steps)
Renders the consolidated simulation status metrics and stacked tapes layout.
Header definition for the interactive CLI dashboard interface.