predicator v0.7.3 Predicator.Machine

A Machine Struct is comprised of the instructions set, the current stack, the instruction pointer and the context struct.

iex>%Predicator.Machine{} %Predicator.Machine{instructions: [], stack: [], instruction_pointer: 0, context: nil, opts: []}

Link to this section Summary

Link to this section Types

Link to this type t()
t() :: %Predicator.Machine{
  context: struct() | map(),
  instruction_pointer: non_neg_integer(),
  instructions: [] | [...],
  opts: [{atom(), atom()}, ...] | [{atom(), [...]}, ...],
  stack: [] | [...]
}

Link to this section Functions

Link to this function accept_instruction(m, inst)
Link to this function complete?(machine)
Link to this function has_variable?(machine, key)
Link to this function increment_pointer(machine, amount)
Link to this function load!(machine, key)
Link to this function new(instructions, context \\ %{}, opts \\ [])
Link to this function next_instruction(machine)
Link to this function pop_instruction(machine)
Link to this function put_instruction(machine, instruction, opts \\ [])
Link to this function replace_stack(machine, value)