Definition CL_initial_core (v: val) (args:list val): option CL_core :=
match v with
| Vptr b i =>
if Int.eq_dec i Int.zero
then match Genv.find_funct_ptr ge b with
| None => None
| Some f => Some (CL_Callstate f args Kstop)
end
else None
| _ => None
end.
End SEMANTICS.
Definition CL_core_sem (FE:function -> list val -> mem -> env -> temp_env -> mem -> Prop)
: CoreSemantics genv CL_core mem.
eapply @Build_CoreSemantics with (at_external:=CL_at_external)
(after_external:=CL_after_external)
(corestep:=clight_corestep FE)
(halted:=CL_halted).
apply CL_initial_core.
apply CL_corestep_not_at_external.
apply CL_corestep_not_halted.
apply CL_at_external_halted_excl.
apply CL_after_at_external_excl.
Defined.

Lemma CL_forward :
forall (FE: function -> list val -> mem -> env -> temp_env -> mem -> Prop)
(HFE: forall f vargs m e le m', FE f vargs m e le m'-> mem_forward m m')
g c m c' m' (CS: clight_corestep FE g c m c' m'),
mem_forward m m'.