Ft_turing.Executecheck_input input blank does sanity checks on input and returns its length if all is good
convert input blank length convert a string input into a resizable vector
is_final tbl state simple boolean to check if a state is contained in the Hashtbl of all known states
val is_blocked :
Stdlib.Format.formatter ->
( string, 'a ) CCVector.t ->
string ->
string ->
int ->
print:bool ->
unitis_blocked tape state read index state_tbl print
val terminate :
Stdlib.Format.formatter ->
string ->
string ->
bool ->
( string, 'a ) CCVector.t ->
int ->
( string, 'b * bool ) Stdlib.Hashtbl.t ->
unitterminate current_state read print tape index state_tbl is called when machine is estimated to be in a final or blocked state
val move_direction : Lang.direction -> intmove_direction direction converts a given action field direction to an incrementation or decrementation of the index in the recursive interpretation
val execution :
Stdlib.Format.formatter ->
print:bool ->
(( string, 'a * bool ) Stdlib.Hashtbl.t
* ( string * string, string * string * Lang.direction ) Stdlib.Hashtbl.t) ->
( string, CCVector.rw ) CCVector.t ->
int ->
string ->
unitexecution tables tape index current_state recursively reads and writes on given tape at given index in regards to current state by following the transitions found in transitions and states tables
val interpreter :
Stdlib.Format.formatter ->
((string list
* string
* string
* (( string, 'a * bool ) Stdlib.Hashtbl.t
* ( string * string, string * string * Lang.direction ) Stdlib.Hashtbl.t))
* string) ->
unitinterpreter machine input function sets up the execution of the turing machine machine on the input.