Creates a new Minsky Register Machine with the specified number of registers and program. Validates that all register indices and instruction pointers in the program are within bounds.
The number of registers (must be positive)
The list of instructions for the machine
If the number of registers is not positive or if the program contains invalid instructions
Returns the machine program as a tuple.
A tuple containing the program and number of registers
Creates a copy of this Minsky Register Machine. The copy has the same program and register count, but registers are not initialized.
A new MinskyRegisterMachine instance with the same program
Gets the current configuration of the machine.
The current configuration containing register values and instruction pointer
Starts the machine with the specified initial register values. The instruction pointer is set to 0.
Object containing the initial register values as bigints
If the number of registers provided does not match the machine's register count
Generated using TypeDoc
Implements the Minsky Register Machine, a Turing-complete computation model that operates on a finite number of registers containing non-negative integers. Programs consist of increment, decrement-and-branch, and halt instructions.