Wolfram Language Paclet Repository
Community-contributed installable additions to the Wolfram Language
| "RegisterMachine" a register machine | |
create a new instance of a register machine configured according to assoc |
"CLR"[r] | clear register r | |
"CPY"[ r i r j | copy register r i r j | |
"DEC"[r] | decrement register r | |
"DECJ"[r,z] | decrement register r z | |
"INC"[r] | increment register r | |
"INCJ"[r,z] | increment register r z | |
"J"[z] | jump to instruction z | |
"JE"[ r i r j | jump to instruction z r i r j | |
"JNZ"[r,z] | jump to instruction z r | |
"JZ"[r,z] | jump to instruction z r | |
"JZDEC"[r, z true z false | jump to z true r r z false |
n | integer representing the number of available registers | |
{ n 1 n 2 | list of integers representing the contents of each register |
"AbacusMachine" | {"INCJ","JZDEC"} | ||
"ElgotRobinson" | {"INC","CPY","JE"} | ||
"MinskyMachine" | {"INCJ","JZDEC"} | ||
"NKS" | {"INC","DECJ"} | ||
"ProgramMachine" | {"INC","DEC","JZ"} | ||
"Set1" | {"INC","DEC","JZ"} | ||
"Set2" | {"CLR","INC","JE"} | ||
"Set3" | {"INC","CPY","JE"} | ||
"ShepherdsonSturgisMachine" | {"INC","DEC","CLR","CPY","JNZ","J"} | ||
"SuccesorMachine" | {"CLR","INC","JE"} |
obj["Definition"] | ||
obj["Evolution"] | a list representing the evolution of the machine | |
obj["EvolutionDataset"] | ||
obj["MachineState"] | ||
obj["Model"] | ||
obj["Program"] | the list of instructions to be executed | |
obj["ProgramMnemonic"] | a formatted view of obj["Program"] | |
obj["RegisterCount"] | the number of registers available | |
obj["RegisterEvolution"] | a list representing the evolution of the register's contents | |
obj["RegisterEvolutionPlot"] | a plot of obj["RegisterEvolution"] | |
obj["StepCount"] | the number of steps run |
reset the state of the machine to its initial configuration | ||
run n |
Examples | MoreExamples⊳ |
VirtualMachine |
|
VirtualMachineObject | |||||||||
|
VirtualMachineExecute |
|
| |||||||||||||||||||||||||||||||||||||||||||||||||