Local Open Scope logic.
Require Export mc_reify.reify.
Require Export MirrorCore.RTac.Repeat.
Require Export MirrorCore.RTac.Try.
Require Export MirrorCore.RTac.First.
Require Export mc_reify.funcs.
Require Export mc_reify.reflexivity_tacs.

(* Specifications: *)
Lemma msubst_efield_denote_nil: forall T1 T2, msubst_efield_denote T1 T2 nil = Some nil.
Lemma msubst_efield_denote_cons_struct: forall fld efs T1 T2 gfs,
msubst_efield_denote T1 T2 efs = Some gfs ->
msubst_efield_denote T1 T2 (eStructField fld :: efs) = Some (StructField fld :: gfs).
Lemma msubst_efield_denote_cons_union: forall fld efs T1 T2 gfs,
msubst_efield_denote T1 T2 efs = Some gfs ->
msubst_efield_denote T1 T2 (eUnionField fld :: efs) = Some (UnionField fld :: gfs).
Lemma msubst_efield_denote_cons_array: forall ei efs T1 T2 i gfs,
msubst_efield_denote T1 T2 efs = Some gfs ->
type_is_int ei = true ->
msubst_eval_LR T1 T2 ei RRRR = Some (Values.Vint i) ->
msubst_efield_denote T1 T2 (eArraySubsc ei :: efs) = Some (ArraySubsc (Int.unsigned i) :: gfs).
Lemma semax_set_localD:
forall temp var ret gt
id (e: Clight.expr) ty gs P T1 T2 R Post v,
forall {Espec: OracleKind},
typeof_temp (mk_tycontext temp var ret gt gs) id = Some ty ->
is_neutral_cast (implicit_deref (typeof e)) ty = true ->
msubst_eval_LR T1 T2 e RRRR = Some v ->
tc_expr_b_norho (mk_tycontext temp var ret gt gs) e = true ->
assertD P (localD (PTree.set id v T1) T2) R = Post ->
semax (mk_tycontext temp var ret gt gs) (|> (assertD P (localD T1 T2) R))
(Sset id e)
(normal_ret_assert Post).