Module 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.