Struct timi::machine::Machine [] [src]

pub struct Machine {
    pub stack: Stack,
    pub heap: Heap,
    pub globals: Environment,
    pub dump: Dump,
    pub options: MachineOptions,
}

the core machine that runs our program.

Fields

Methods

impl Machine
[src]

Create a minimal machine that has the prelude and primitives instantiated, but with an empty stack.

Create a machine from program. Expects a main to be present in the given program.

Errors

returns an error if main was not found

Add the supercombinator to the machine.

This will allocate the supercombinator on the heap and create a binding in the environment to the name of the supercombinator.

Returns the address of allocation of the supercombinator

setup the execution of a registered supercombinator with name sc_name.

returns whether the machine is in final state or not.

Errors

Returns MachineError if machine is in invalid state

inspect the top of the stack and take a step in interpretation if we are not in the final state

Trait Implementations

impl Clone for Machine
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more