(* Definition mk_ret_assert (n b c : environ -> mpred) (r: option val -> environ -> mpred) : ret_assert := fun (ek : exitkind) (vl : option val) => match ek with | EK_normal => !! (vl=None) && n | EK_break => !! (vl=None) && b | EK_continue => !! (vl=None) && c | EK_return => r vl end. *)

Lemma semax_for_3g2:  (* no break statements in loop *)
forall Espec {cs: compspecs} {A} (PQR: A -> environ -> mpred) (v: A -> val) Delta P Q R test body incr Post,
bool_type (typeof test) = true ->
(forall a, ENTAIL Delta, PROPx (P a) (LOCALx (Q a) (SEPx (R a))) |-- (tc_expr Delta (Eunop Cop.Onotbool test tint))) ->
(forall a, ENTAIL Delta, PROPx (P a) (LOCALx (Q a) (SEPx (R a))) |-- local (`(eq (v a)) (eval_expr test))) ->
(forall a, @semax cs Espec Delta (PROPx (typed_true (typeof test) (v a) :: (P a)) (LOCALx (Q a) (SEPx (R a))))
body (loop1x_ret_assert (EX a:A, PQR a) Post)) ->
(forall a, @semax cs Espec Delta (PQR a) incr
(normal_ret_assert (EX a:A, PROPx (P a) (LOCALx (Q a) (SEPx (R a)))))) ->
@semax cs Espec Delta (EX a:A, PROPx (P a) (LOCALx (Q a) (SEPx (R a))))
(Sloop (Ssequence (Sifthenelse test Sskip Sbreak)  body) incr)
(overridePost
(EX a:A, PROPx (typed_false (typeof test) (v a) :: (P a)) (LOCALx (Q a) (SEPx (R a))))
Post).