Section Correctness.

(** Correctness of the assign statement. The resulting list of instructions is denoted as denoting the expression followed by setting the variable. *)
Lemma compile_assign_correct : forall {E} e x,
bisimilar eq
((v <- denote_expr e ;; trigger (Imp.SetVar x v)) : itree (ImpState +' E) unit)
((denote_list (compile_assign x e)) : itree (Reg +' Memory +' E) unit).