Rabbit VM

From Adam Colton
Jump to navigation Jump to search

A hybrid VM: I need to do a lot of research.

What will determine if it is fundamentally a register machine or a stack machine is how function calls are made. For this, I think registers perform better.

Data Types

Int
start with just 64bit
eventually add int of any size int<64>
Float
same, start with 64bit
float<53,11> which is float<mantissa,exponent>
bool

Operator Categories

Flow
All the jump calls
Function calls
Thread
Start
Return (stop)
Pause
Resume
Sync
CAS
Swap
Add
Math
+-*/%

Security

An interesting application (related to dist.ribut.us) would be to classify secure operators. Access to filesystems, network, devices and so forth. Any application can run without elevated permissions with out any risk. Using a EigenTrust signing system, we can safely run scripts from untrusted sources.

To further elevate this, limits on memory, stack and total operation can be implemented.

Ops

set r v
<i,f>add r1 r2 r3
r1 = r2+r3
[or,and,xor,nor,nand] r1 r2 r3
r1 = r2 op r3
cp r1 r2
r1 = r2
swap r1 r2
load r1 r2
loads the memory value at r2 into r1
loadall
loads r2+ with the memory starting at r1
push r
push the register value at r onto the stack
pop r
pop the stack and write to r