Module Main__.Eval
include Main__.Vm
type vm_atom=|VMAtom of string * node_ref array|VMInd of node_ref Stdlib.refand node_ref= (int * vm_atom) Stdlib.ref(indeg, atom)
val null_ptr : (int * vm_atom) Stdlib.refレジスタを初期化するためだけのアドレス(本来はいらない)
type register= node_ref arrayレジスタ
val init_register : int -> (int * vm_atom) Stdlib.ref array初期状態のレジスタを確保する
val deref_symbol_atom : ('a * vm_atom) Stdlib.ref -> string * node_ref arrayシンボルアトムへの参照を dereference する
val free_atom : ('a * vm_atom) Stdlib.ref -> unitFree memory fragment of the given address. Possibly implemented with
optiontype and assignNone.
val traverse : int -> node_ref -> node_refTraverse indirection atoms and returns the pointing symbol atom. There is no worring of circulating indirection (if that exists, then the basic design is wrong). If the given pointer points to an indirection atom, decrease the reference counter by the given
ref_count(which is 1 if this is pointed by a symbol atom)- returns
 the reference to a symbol atom
val clean_atom_list : ('a * vm_atom) Stdlib.ref list -> unitResolve indirections and clean up the given atom list. Supposed to be called in the end of the program execution.
val reduce : Main__.Vm.node_ref list -> (int * (Generator.lhs_inst list * Generator.rhs_inst list)) -> Main__.Vm.node_ref list optionTry to reduce one step with the given atoms and a rule
- ルール適用に成功したら Some で包んだ更新された atom_list を返す
 
val run_once : Main__.Vm.node_ref list -> (int * (Generator.lhs_inst list * Generator.rhs_inst list)) list -> Main__.Vm.node_ref list optionTry reduce one step with the given atoms and rules
val init_atoms : (int * Generator.rhs_inst list) -> Main__.Vm.node_ref listpush the initial graph and return their references