Module CallB: CLIGHT_SEPARATION_HOARE_LOGIC_CALL_BACKWARD with Module CSHL_Def := DeepEmbeddedDef.
Module CSHL_Def := DeepEmbeddedDef.
Definition semax_call_backward := @AuxDefs.semax_call_backward.
End CallB.
Module CallF := CallB2F (DeepEmbeddedDef) (Conseq) (CallB).
Definition semax_call := @CallF.semax_call_forward.
Definition semax_return := @AuxDefs.semax_return.
Module Sset: CLIGHT_SEPARATION_HOARE_LOGIC_SSET_BACKWARD with Module CSHL_Def := DeepEmbeddedDef.
Module CSHL_Def := DeepEmbeddedDef.
Definition semax_set_ptr_compare_load_cast_load_backward := @AuxDefs.semax_set_ptr_compare_load_cast_load_backward.
End Sset.
Module SetB := Sset2Set (DeepEmbeddedDef) (Conseq) (Sset).
Module SetF := SetB2F (DeepEmbeddedDef) (Conseq) (SetB).
Definition semax_set_forward := @SetF.semax_set_forward.
Module PtrCmpB := Sset2PtrCmp (DeepEmbeddedDef) (Conseq) (Sset).
Module PtrCmpF := PtrCmpB2F (DeepEmbeddedDef) (Conseq) (PtrCmpB).
Definition semax_ptr_compare := @PtrCmpF.semax_ptr_compare_forward.
Module LoadB := Sset2Load (DeepEmbeddedDef) (Conseq) (Sset).
Module LoadF := LoadB2F (DeepEmbeddedDef) (Conseq) (LoadB).
Definition semax_load := @LoadF.semax_load_forward.
Module CastLoadB := Sset2CastLoad (DeepEmbeddedDef) (Conseq) (Sset).
Module CastLoadF := CastLoadB2F (DeepEmbeddedDef) (Conseq) (CastLoadB).
Definition semax_cast_load := @CastLoadF.semax_cast_load_forward.
Module StoreB: CLIGHT_SEPARATION_HOARE_LOGIC_STORE_BACKWARD with Module CSHL_Def := DeepEmbeddedDef.
Module CSHL_Def := DeepEmbeddedDef.
Definition semax_store_backward := @AuxDefs.semax_store_backward.
End StoreB.
Module StoreF := StoreB2F (DeepEmbeddedDef) (Conseq) (StoreB).
Definition semax_store := @StoreF.semax_store_forward.
Definition semax_skip := @AuxDefs.semax_skip.
Definition semax_conseq := @AuxDefs.semax_conseq.
Definition semax_Slabel := @AuxDefs.semax_label.
Definition semax_ext := @MinimumLogic.semax_ext.
Definition semax_ext_void := @MinimumLogic.semax_ext_void.
Definition semax_external_FF := @MinimumLogic.semax_external_FF.
End DeepEmbeddedMinimumSeparationLogic.
Module DeepEmbeddedPracticalLogic <: PRACTICAL_CLIGHT_SEPARATION_HOARE_LOGIC.
Module CSHL_Def := DeepEmbeddedDef.
Module CSHL_Defs := DeepEmbeddedDefs.
Module CSHL_MinimumLogic := DeepEmbeddedMinimumSeparationLogic.
Definition semax_set := @DeepEmbeddedMinimumSeparationLogic.SetB.semax_set_backward.
Arguments semax {_} {_} _ _ _ _.

(* Specifications: *)
Lemma modifiedvars_aux: forall id, (fun i => isSome (insert_idset id idset0) ! i) = eq id.
Lemma sepcon_derives_full: forall Delta P1 P2 Q1 Q2,
local (tc_environ Delta) && (allp_fun_id Delta && P1) |-- |==> |> FF || P2 ->
local (tc_environ Delta) && (allp_fun_id Delta && Q1) |-- |==> |> FF || Q2 ->
local (tc_environ Delta) && (allp_fun_id Delta && (P1 * Q1)) |-- |==> |> FF || (P2 * Q2).
Lemma semax_frame:
forall {CS: compspecs} {Espec: OracleKind},
forall Delta P s R F,
closed_wrt_modvars s F ->
@semax CS Espec Delta P s R ->
@semax CS Espec Delta (P * F) s (frame_ret_assert R F).
Lemma tc_fn_return_sub:
forall (CS : compspecs) (Delta Delta' : tycontext),
tycontext_sub Delta Delta' ->
forall ret retsig,
tc_fn_return Delta ret retsig ->
tc_fn_return Delta' ret retsig.
Lemma obox_sub:
forall (Delta Delta' : tycontext) id P rho,
tycontext_sub Delta Delta' ->
temp_guard Delta id ->
tc_environ Delta rho ->
obox Delta id P rho |-- obox Delta' id P rho.
Lemma oboxopt_sub:
forall (Delta Delta' : tycontext) id P rho,
tycontext_sub Delta Delta' ->
temp_guard_opt Delta id ->
tc_environ Delta rho ->
oboxopt Delta id P rho |-- oboxopt Delta' id P rho.
Lemma typecheck_tid_ptr_compare_sub: forall Delta Delta' id,
tycontext_sub Delta Delta' ->
typecheck_tid_ptr_compare Delta id = true ->
typecheck_tid_ptr_compare Delta' id = true.
Theorem semax_extensionality_Delta:
forall {CS: compspecs} {Espec: OracleKind},
forall Delta Delta' P c R,
tycontext_sub Delta Delta' ->
@semax CS Espec Delta P c R -> @semax CS Espec Delta' P c R.
Lemma semax_loop_nocontinue:
forall {CS: compspecs} {Espec: OracleKind},
forall Delta P body incr R,
@semax CS Espec Delta P (Ssequence body incr) (loop_nocontinue_ret_assert P R) ->
@semax CS Espec Delta P (Sloop body incr) R.
Lemma semax_if_seq:
forall {CS: compspecs} {Espec: OracleKind} Delta P e c1 c2 c Q,
semax Delta P (Sifthenelse e (Ssequence c1 c) (Ssequence c2 c)) Q ->
semax Delta P (Ssequence (Sifthenelse e c1 c2) c) Q.
Lemma semax_loop_unroll1:
forall {CS: compspecs} {Espec: OracleKind} Delta P P' Q body incr R,
@semax CS Espec Delta P body (loop1_ret_assert P' R) ->
@semax CS Espec Delta P' incr (loop2_ret_assert Q R) ->
@semax CS Espec Delta Q (Sloop body incr) R ->
@semax CS Espec Delta P (Sloop body incr) R.
Theorem seq_assoc:
forall {CS: compspecs} {Espec: OracleKind},
forall Delta P s1 s2 s3 R,
@semax CS Espec Delta P (Ssequence s1 (Ssequence s2 s3)) R <->
@semax CS Espec Delta P (Ssequence (Ssequence s1 s2) s3) R.
Theorem semax_seq_skip:
forall {CS: compspecs} {Espec: OracleKind},
forall Delta P s Q,
@semax CS Espec Delta P s Q <-> @semax CS Espec Delta P (Ssequence s Sskip) Q.
Theorem semax_skip_seq:
forall {CS: compspecs} {Espec: OracleKind},
forall Delta P s Q,
@semax CS Espec Delta P s Q <-> @semax CS Espec Delta P (Ssequence Sskip s) Q.
Theorem semax_seq_Slabel:
forall {CS:compspecs} {Espec: OracleKind},
forall Delta (P:environ -> mpred) (c1 c2:statement) (Q:ret_assert) l,
@semax CS Espec Delta P (Ssequence (Slabel l c1) c2) Q <->
@semax CS Espec Delta P (Slabel l (Ssequence c1 c2)) Q.