High Level Code Generator (OCaml implementation)