- type Trace = [State]
- wordAll :: Instrs -> State -> [State]
- word :: Instrs -> State -> State
- stepAll :: State -> [State]
- step :: State -> State
- traceAll :: State -> Trace
- traceProgram :: State -> Trace
- stepProgram :: State -> Trace
- eval :: State -> State
- runNativeProgram :: State -> NativeProgram -> State
- countTime :: Trace -> Double
- throttle :: Int -> Trace -> Either Trace Trace
- endWord :: Opcode -> Bool
- run :: Opcode -> [State] -> [State]
- execute :: Opcode -> State -> State
- jump :: Opcode -> F18Word -> State -> State
Runs a single word's worth of instructions starting from the given state, returning the intermediate states for each executed opcode.
Runs a single word's worth of instructions, returning only the final state.
Executes a single word in the given state, incrementing the program counter and returning all the intermediate states.
Executes a single word in the given state, returning the last resulting state.q
Returns a trace of the program's execution. The trace is a list of the state of the chip after each step.
Runs the program unil it hits a terminal state, returning only the resulting state.
Executes the specified program on the given state until it hits a terminal word--a word made up of four nops or all 0s.
Checks that the program trace terminated in at most n steps, returning Nothing otherwise.
Extends the given trace by a single execution step. The trace cannot be empty.