| Crates.io | min_infmachine |
| lib.rs | min_infmachine |
| version | 0.1.0 |
| created_at | 2025-08-30 10:07:13.927049+00 |
| updated_at | 2025-08-30 10:07:13.927049+00 |
| description | The Minimalistic Infinite Machine with random access memory. |
| homepage | |
| repository | https://github.com/matszpk/min_infmachine |
| max_upload_size | |
| id | 1817489 |
| size | 103,266 |
MinInfMachine - Minimalistic infinite machine with reduced interface. It is infinite machine with random access memory.
MinInfMachine is extended infinite machine (like Turing machine) with random access memory. The machine model contains memory address memory, temporary buffer (temp buffer) memory, main memory, memory address position, temp buffer position, internal state and function return. Memory address and temp buffer are memory with sequential access. Temp buffer is only name doesn't mean that memory is temporary. Main memory is memory with random access. Memory address position and temp buffer position are position of corresponding memories. Internal state and function return points to transition table entry. Function return (func_ret) returnd value by previous instruction in previous cycle.
All memories contains bits and bits are cell of that memories. Position in sequential memory points to cell of that memory and memory address points to bit of main memory. Default initial value of any element of machine is zero.
MinInfMachine transition table contains main entries that are pair of two entries. First entry for func_ret=0 and second for func_ret=1. Entry contains next internal state and function (instruction) to execute. In this implementation transition table divided into two parts: entries for func_ret=0 and entries for func_ret=1. Index is internal state and number of possible internal states should be power of two.
MinInfMachine works in following cycle:
Terms:
rev_mem_address - reverse memory addressing: it doesn't change behaviour of machine. It changes organization of main memory in real computer memory (it reverses memory address bits).
Main memory contains 1-bit cells and addressed by flat model. Memory is infinite. Memory address is infinite. Temp buffer is temporary buffer that simplify operations on memory address avoiding conflicts while replaced memory address by other. Temp buffer is infinite. Machine interface:
Input: [STATE, FUNC_RETURN]
Output: [STATE, FUNC]
STATE - internal state.
FUNC_RETURN - 1-bit returned value by function (func_ret). Initial value is zero.
FUNC - 4-bit. Function (instruction) - it is opcode of function (instruction).
List of implemented functions (instructions) in form: opcode - description.
Memory operations:
Memory operations returns value of read cell.
Movements:
Movement functions returns 1 if movement done, otherwise returns 0.
Special function: