From compcert Require Export Clightdefs.
Local Open Scope logic.
Module DeepEmbeddedSoundness
(Def: CLIGHT_SEPARATION_HOARE_LOGIC_DEF)
(MinimumLogic: MINIMUM_CLIGHT_SEPARATION_HOARE_LOGIC with Module CSHL_Def := Def)
(Sound: SEPARATION_HOARE_LOGIC_SOUNDNESS with Module CSHL_Def := Def)
<: SEPARATION_HOARE_LOGIC_SOUNDNESS.
Module DeepEmbedded := DeepEmbedded (Def) (MinimumLogic).
Module CSHL_Def := DeepEmbedded.DeepEmbeddedDef.
Module CSHL_Defs := DeepEmbedded.DeepEmbeddedDefs.
Arguments CSHL_Def.semax {_} {_} _ _ _ _.
Module Conseq := GenConseq (Def) (MinimumLogic).
Module ExtrFacts := GenExtrFacts (Def) (Conseq) (MinimumLogic).
Module CallF: CLIGHT_SEPARATION_HOARE_LOGIC_CALL_FORWARD with Module CSHL_Def := Def.
Module CSHL_Def := Def.
Definition semax_call_forward := @MinimumLogic.semax_call.
End CallF.
Module CallB := CallF2B (Def) (Conseq) (MinimumLogic) (CallF).
Module SetF: CLIGHT_SEPARATION_HOARE_LOGIC_SET_FORWARD with Module CSHL_Def := Def.
Module CSHL_Def := Def.
Definition semax_set_forward := @MinimumLogic.semax_set_forward.
End SetF.
Module SetB := SetF2B (Def) (Conseq) (MinimumLogic) (SetF).
Module PtrCmpF: CLIGHT_SEPARATION_HOARE_LOGIC_PTR_CMP_FORWARD with Module CSHL_Def := Def.
Module CSHL_Def := Def.
Definition semax_ptr_compare_forward := @MinimumLogic.semax_ptr_compare.
End PtrCmpF.
Module PtrCmpB := PtrCmpF2B (Def) (Conseq) (MinimumLogic) (PtrCmpF).
Module LoadF: CLIGHT_SEPARATION_HOARE_LOGIC_LOAD_FORWARD with Module CSHL_Def := Def.
Module CSHL_Def := Def.
Definition semax_load_forward := @MinimumLogic.semax_load.
End LoadF.
Module LoadB := LoadF2B (Def) (Conseq) (MinimumLogic) (LoadF).
Module CastLoadF: CLIGHT_SEPARATION_HOARE_LOGIC_CAST_LOAD_FORWARD with Module CSHL_Def := Def.
Module CSHL_Def := Def.
Definition semax_cast_load_forward := @MinimumLogic.semax_cast_load.
End CastLoadF.
Module CastLoadB := CastLoadF2B (Def) (Conseq) (MinimumLogic) (CastLoadF).
Module StoreF: CLIGHT_SEPARATION_HOARE_LOGIC_STORE_FORWARD with Module CSHL_Def := Def.
Module CSHL_Def := Def.
Definition semax_store_forward := @MinimumLogic.semax_store.
End StoreF.
Module StoreB := StoreF2B (Def) (Conseq) (MinimumLogic) (StoreF).
Module Extr : CLIGHT_SEPARATION_HOARE_LOGIC_EXTRACTION with Module CSHL_Def := Def := MinimumLogic.
Module Sset := ToSset (Def) (Conseq) (Extr) (SetB) (PtrCmpB) (LoadB) (CastLoadB).

Theorem semax_body_sound: forall Vspec Gspec CS f id,
@DeepEmbedded.DeepEmbeddedDefs.semax_body Vspec Gspec CS f id ->
@MinimumLogic.CSHL_Defs.semax_body Vspec Gspec CS f id.