[ocaml] fix bugs on json_of_constraint
[ocaml] refactor codes
[ocaml] implement DNF functions; refactor codes