Scol virtual machine operates on the principle of a data stack, the elements are pushed or pulled into an order defined by the function. The stack status is very important, an element in the wrong place can make the stack unstable throughout the system.
Representation of the Scol stack¶The Scol stack can be represented as follows:
- Pull (MMpull) an element of the stack returns to remove this item from the stack, the order of the indexes of elements remaining in the stack is changed.
[_2_] [_1_] [_0_] [___] -> pull
- Push (MMpush) an element in the stack returns to add this item to the stack. The order of the indexes of elements in the stack is changed, the new element is at index 0.
[_3_] [_2_] [_1_] push -> [_0_]
Data structure (-> wikipedia)