[ocaml] implement SAS generator