Boolean expressions have very trivial denotational semantics (since there's no recursion or state), so you could try formalising these in Coq (FRAP [1] and Software Foundations Vol. 2 [2] are both good places to learn more about this).
Next, you could write formal operational semantics for your VM, and then finally prove that your compiler is correct in a formal sense (i.e. the image of any well-formed input under the compiler operation has a terminating execution in the operational semantics that yields the same value as would be obtained by the execution of the input expression under the denotational semantics).
The last part would require implementing the compiler in Coq, but since you've written it in OCaml it probably wouldn't be very hard to port.
[1] : https://frap.csail.mit.edu/main
[2] : https://softwarefoundations.cis.upenn.edu/plf-current/toc.ht...
Edit: Having looked at your profile I now realise that you probably know all of this already, but it might be informative for anyone else reading :)