End SEPARATION_HOARE_LOGIC_SOUNDNESS.
Module Type MAIN_THEOREM_STATEMENT.
Declare Module CSHL_Def: CLIGHT_SEPARATION_HOARE_LOGIC_DEF.
Declare Module CSHL_MinimumLogic: MINIMUM_CLIGHT_SEPARATION_HOARE_LOGIC with Module CSHL_Def := CSHL_Def.
(* Definition corable_func_ptr: forall f v, corable (func_ptr f v) := general_assert_lemmas.corable_func_ptr.*)
Declare Module CSHL_PracticalLogic: PRACTICAL_CLIGHT_SEPARATION_HOARE_LOGIC with Module CSHL_MinimumLogic := CSHL_MinimumLogic.
Declare Module CSHL_Sound: SEPARATION_HOARE_LOGIC_SOUNDNESS with Module CSHL_Def := CSHL_Def.
End MAIN_THEOREM_STATEMENT.
Module VericDef <: CLIGHT_SEPARATION_HOARE_LOGIC_DEF.
Definition semax := @semax.
Definition semax_func := @semax_func.
Definition semax_external {Espec: OracleKind} ids ef A P Q :=
forall n, semax_external Espec ids ef A P Q n.
End VericDef.
Module VericMinimumSeparationLogic: MINIMUM_CLIGHT_SEPARATION_HOARE_LOGIC with Module CSHL_Def := VericDef.
Module CSHL_Def := VericDef.
Module CSHL_Defs := DerivedDefs (VericDef).
Definition semax_extract_exists := @extract_exists_pre.
Definition semax_body := @semax_body.
Definition semax_prog := @semax_prog.
Definition semax_prog_ext := @semax_prog_ext.
Definition semax_func_nil := @semax_func_nil.
Definition semax_func_cons := @semax_func_cons.
(* Definition semax_func_skip := @semax_func_skip. *)
Definition make_ext_rval := veric.semax.make_ext_rval.
Definition tc_option_val := veric.semax.tc_option_val.
Definition semax_func_cons_ext := @semax_func_cons_ext.
Definition semax_seq := @semax_seq.
Definition semax_break := @semax_break.
Definition semax_continue := @semax_continue.
Definition semax_loop := @semax_loop.
Definition semax_switch := @semax_switch.
Definition semax_Slabel := @semax_Slabel.
Definition semax_call := @semax_call.
(* Definition semax_call_ext := @semax_call_ext. *)
Definition semax_set_forward := @semax_set_forward.
Definition semax_ifthenelse := @semax_ifthenelse.
Definition semax_return := @semax_return.

(* Specifications: *)
Lemma semax_store:forall (CS : compspecs) (Espec : OracleKind)
(Delta : tycontext) (e1 e2 : expr) (sh : share)
(P : environ -> pred rmap),
writable_share sh ->
semax Espec Delta
(fun rho : environ =>
(|> (extend_tc.tc_lvalue Delta e1 rho &&
extend_tc.tc_expr Delta (Ecast e2 (typeof e1)) rho &&
(mapsto_memory_block.mapsto_ sh
(typeof e1) (eval_lvalue e1 rho) *
P rho)))%pred) (Sassign e1 e2)
(Clight_seplog.normal_ret_assert
(fun rho : environ =>
(mapsto_memory_block.mapsto sh (typeof e1)
(eval_lvalue e1 rho)
(force_val
(sem_cast (typeof e2) (typeof e1) (eval_expr e2 rho))) *
P rho)%pred)).