Section FIND_LABEL.
Variable lbl: label.
Variable tyret: type.
End FIND_LABEL.
(** Properties of call continuations *)
Definition MATCH (d:CL_core) mu c1 m1 c2 m2:Prop :=
match_states (restrict (as_inj mu) (vis mu)) c1 m1 c2 m2 /\
REACH_closed m1 (vis mu) /\
meminj_preserves_globals ge (as_inj mu) /\
globalfunction_ptr_inject (as_inj mu) /\
(forall b, isGlobalBlock ge b = true -> frgnBlocksSrc mu b = true) /\
sm_valid mu m1 m2 /\ SM_wd mu /\ Mem.inject (as_inj mu) m1 m2.
(*(FE : Clight.function -> list val -> mem -> Clight.env -> Clight.temp_env -> mem -> Prop) (FE_FWD : forall f vargs m e lenv m', FE f vargs m e lenv m' -> mem_forward m m') (FE_UNCH : forall f vargs m e lenv m', FE f vargs m e lenv m' ->( Mem.unchanged_on (fun b z => EmptyEffect b z = false) m m'))*)
(*  (CS: corestep (clight_eff_sem FE FE_FWD FE_UNCH) ge st1 m1 st1' m1')*)
(*  (FE : Clight.function -> list val -> mem -> Clight.env -> Clight.temp_env -> mem -> Prop) (FE_FWD : forall (f : Clight.function) (vargs : list val) (m : mem) (e : Clight.env) (lenv : Clight.temp_env) (m' : mem), FE f vargs m e lenv m' -> mem_forward m m') (FE_UNCH : forall (f : Clight.function) (vargs : list val) (m : mem) (e : Clight.env) (lenv : Clight.temp_env) (m' : mem), FE f vargs m e lenv m' -> Mem.unchanged_on (fun (b : block) (z : Z) => EmptyEffect b z = false) m m')*)
(*  (EFFSTEP: effstep (clight_eff_sem FE FE_FWD FE_UNCH) ge U1 st1 m1 st1' m1')*)

(** The simulation proof *)
Theorem transl_program_correct:
forall (R: list_norepet (map fst (prog_defs prog)))
entrypoints
(entry_points_ok :
forall v1 v2 sig,
In (v1, v2, sig) entrypoints ->
exists b f1 f2,
v1 = Vptr b Int.zero
/\ v2 = Vptr b Int.zero
/\ Genv.find_funct_ptr ge b = Some f1
/\ Genv.find_funct_ptr tge b = Some f2)
(init_mem: exists m0, Genv.init_mem prog = Some m0)
,
SM_simulation.SM_simulation_inject CL_eff_sem2
csharpmin_eff_sem ge tge entrypoints.