[ocaml] use function resolve to dereference data & link references
[ocaml] add comments of bytecode/native option
[ocaml] implement prototype typing inference rules