| Crates.io | min_infmachine_exec |
| lib.rs | min_infmachine_exec |
| version | 0.1.0 |
| created_at | 2025-08-30 11:57:48.787923+00 |
| updated_at | 2025-08-30 11:57:48.787923+00 |
| description | The Minimalistic Infinite Machine Executor and Debugger. |
| homepage | |
| repository | https://github.com/matszpk/min_infmachine_exec |
| max_upload_size | |
| id | 1817558 |
| size | 93,621 |
This is program to execute and debug the Minimalistic Infinite Machines (min_infmachine). Typical usage of program is:
min_infmachine -M my_machine.toml -o memdump0
The command above runs machine from my_machine.toml and store final main memory dump to file.
To debug machine just can enter similar command:
min_infmachine -D -M my_machine.toml
This command loads machine from my_machine.toml and run interactive debugger.
Other command line options:
Rest of commands available in command help (enter command min_infmachine --help).
After run program in debugger mode, program just show prompt and waits for user commands.
It provides similar interface to Unix shell and it provides command history.
It possible to get help about commands by using help command.
Help for given command is available by command help COMMAND or COMMAND --help where
COMMAND is name of command.
Typical commands in debugger mode.
init - initialize (clear) all memories of machine and its internal state.init_state - initialize internal state of machine.initmem - intialize main memory.loadmem FILE [START] - load content of file to main memory of machine. START is start address
of main memory.savemem FILE [START] [END] - save content main memory of machine to file.
START is start address of main memory.loadtempbuf FILE - load temp content of file to temp buffer.savetempbuf FILE - save temp buffer to file.save FILE - save current machine (whole state) to TOML file.exec [CYCLES] - execute machine. If CYCLES specified then execute only CYCLES cycles.cycle - execute single cycle.exec_until EXPR [CYCLES] - execute machine expression will be satisfied. If
CYCLES specified then execute only CYCLES cycles. Constant in expression must be
decimal form. Typical expression is s0==NUMBER or s0==NUMBER&&s1==NUMBER.
Operators && or || are logical operators. See to expression_engine README.mem [START] [END] [FORMAT] - prints main memory from START to END if specified.
FORMAT can be d4 (decimal 4-byte numbers), x2 (hex 2-byte numbers).memaddr [START] [END] [FORMAT] - prints memory address from START to END if specified.
FORMAT can be d4 (decimal 4-byte numbers), x2 (hex 2-byte numbers).tempbuf [START] [END] [FORMAT] - prints temp buffer from START to END if specified.
FORMAT can be d4 (decimal 4-byte numbers), x2 (hex 2-byte numbers).state [FORMAT] - prints state.
FORMAT can be d4 (decimal 4-byte numbers), x2 (hex 2-byte numbers).putmem START VALUE VALUE1 ... - put values (4-byte values) to main memory from START address.setmemaddr VALUE .... - set memory address - content is 4-byte value list.settempbuf VALUE .... - set memory address - content is 4-byte value list.revmemaddr - get rev_memaddr.toggle_revmemaddr - toggle rev memaddr.width WIDTH - set terminal width for interactive debugger (for printing).cycles_per_step CYCLES - set cycles per step.exit - exits from debugger.help - prints help.More informations about debugger commands in debugger help.