(*exists tv, (eval_expr tge (Vptr sp Int.zero) te tm x1 tv /\ val_inject (restrict (as_inj mu) (vis mu)) v tv /\ val_match_approx x2 v) /\*)

(* Specifications: *)
Lemma EFF_step_case_Call: forall
(MCS : structured_match_callstack mu m tm
(Frame cenv tfn e lenv te sp lo hi :: cs)
(Mem.nextblock m)
(Mem.nextblock tm))
x x0 x1 a vf fd optid vargs bl
(MK : match_cont k tk cenv xenv cs)
(EvalA: Csharpminor.eval_expr ge e lenv m a vf)
(EvalBL: Csharpminor.eval_exprlist ge e lenv m bl vargs)
(FF: Genv.find_funct ge vf = Some fd)
(EQ : transl_expr cenv a = OK (x, x0))
(EQ1 : transl_exprlist cenv bl = OK x1),
exists c2' : CMin_core,
exists m2' mu',
effstep_plus cmin_eff_sem tge EmptyEffect
(CMin_State  tfn (Scall optid (Csharpminor.funsig fd) x x1) tk (Vptr sp Int.zero) te) tm c2' m2'
/\ intern_incr mu mu' /\
sm_inject_separated mu mu' m tm /\
sm_locally_allocated mu mu' m tm m m2' /\
Match_cores (CSharpMin_Callstate fd vargs (Csharpminor.Kcall optid f e lenv k)) mu'
(CSharpMin_Callstate fd vargs (Csharpminor.Kcall optid f e lenv k)) m c2' m2' /\
SM_wd mu' /\
sm_valid mu' m m2'.
Lemma EFF_step_case_Ite: forall
(MCS : structured_match_callstack mu m tm
(Frame cenv tfn e lenv te sp lo hi :: cs)
(Mem.nextblock m)
(Mem.nextblock tm))
x x0 x1 x2 b v a s1 s2
(H : Csharpminor.eval_expr ge e lenv m a v)
(BoolOfVal : Val.bool_of_val v b)
(MK : match_cont k tk cenv xenv cs)
(EQ : transl_expr cenv a = OK (x, x0))
(EQ1 : transl_stmt cenv xenv s1 = OK x1)
(EQ0 : transl_stmt cenv xenv s2 = OK x2),
exists c2' : CMin_core,
exists m2' mu',
effstep_plus cmin_eff_sem tge EmptyEffect
(CMin_State tfn (Sifthenelse x x1 x2) tk (Vptr sp Int.zero) te) tm c2' m2' /\
intern_incr mu mu' /\
sm_inject_separated mu mu' m tm /\
sm_locally_allocated mu mu' m tm m m2' /\
Match_cores  (CSharpMin_State f (if b then s1 else s2) k e lenv) mu'
(CSharpMin_State f (if b then s1 else s2) k e lenv) m c2' m2' /\
SM_wd mu' /\
sm_valid mu' m m2'.
Lemma EFF_step_case_Loop: forall
(MCS : structured_match_callstack mu m tm
(Frame cenv tfn e lenv te sp lo hi :: cs)
(Mem.nextblock m)
(Mem.nextblock tm))
x s
(MK : match_cont k tk cenv xenv cs)
(EQ : transl_stmt cenv xenv s = OK x),
exists c2' : CMin_core,
exists m2' mu',
effstep_plus cmin_eff_sem tge EmptyEffect
(CMin_State tfn (Sloop x) tk (Vptr sp Int.zero) te) tm c2' m2' /\
intern_incr mu mu' /\
sm_inject_separated mu mu' m tm /\
sm_locally_allocated mu mu' m tm m m2' /\
Match_cores (CSharpMin_State f s (Csharpminor.Kseq (Csharpminor.Sloop s) k) e lenv) mu'
(CSharpMin_State f s (Csharpminor.Kseq (Csharpminor.Sloop s) k) e lenv) m c2' m2' /\
SM_wd mu' /\
sm_valid mu' m m2'.
Lemma EFF_step_case_Block: forall
(MCS : structured_match_callstack mu m tm
(Frame cenv tfn e lenv te sp lo hi :: cs)
(Mem.nextblock m)
(Mem.nextblock tm))
x s
(MK : match_cont k tk cenv xenv cs)
(EQ : transl_stmt cenv (true :: xenv) s = OK x),
exists c2' : CMin_core,
exists m2' mu',
effstep_plus cmin_eff_sem tge EmptyEffect
(CMin_State tfn (Sblock x) tk (Vptr sp Int.zero) te) tm c2' m2' /\
intern_incr mu mu' /\
sm_inject_separated mu mu' m tm /\
sm_locally_allocated mu mu' m tm m m2' /\
Match_cores (CSharpMin_State f s (Csharpminor.Kblock k) e lenv) mu'
(CSharpMin_State f s (Csharpminor.Kblock k) e lenv) m c2' m2'
/\ SM_wd mu' /\
sm_valid mu' m m2'.
Lemma EFF_step_case_ExitSeq: forall
(MCS : structured_match_callstack mu m tm
(Frame cenv tfn e lenv te sp lo hi :: cs)
(Mem.nextblock m)
(Mem.nextblock tm))
n s
(MK : match_cont (Csharpminor.Kseq s k) tk cenv xenv cs),
exists c2' : CMin_core,
exists m2' mu',
effstep_plus cmin_eff_sem tge EmptyEffect
(CMin_State tfn (Sexit (shift_exit xenv n)) tk (Vptr sp Int.zero) te) tm c2' m2'  /\
Match_cores (CSharpMin_State f (Csharpminor.Sexit n) k e lenv) mu'
(CSharpMin_State f (Csharpminor.Sexit n) k e lenv) m c2' m2'
/\ intern_incr mu mu' /\
sm_inject_separated mu mu' m tm /\
sm_locally_allocated mu mu' m tm m m2' /\
SM_wd mu' /\ sm_valid mu' m m2'.
Lemma EFF_step_case_ExitBlockZero: forall
(MCS : structured_match_callstack mu m tm
(Frame cenv tfn e lenv te sp lo hi :: cs)
(Mem.nextblock m)
(Mem.nextblock tm))
(MK : match_cont (Csharpminor.Kblock k) tk cenv xenv cs),
exists c2' : CMin_core,
exists m2' mu',
effstep_plus cmin_eff_sem tge EmptyEffect
(CMin_State tfn (Sexit (shift_exit xenv 0)) tk (Vptr sp Int.zero) te) tm c2' m2'
/\ Match_cores (CSharpMin_State f Csharpminor.Sskip k e lenv) mu'
(CSharpMin_State f Csharpminor.Sskip k e lenv) m c2' m2'
/\ intern_incr mu mu' /\
sm_inject_separated mu mu' m tm /\
sm_locally_allocated mu mu' m tm m m2' /\
SM_wd mu' /\ sm_valid mu' m m2'.
Lemma EFF_step_case_ExitBlockNonzero: forall
(MCS : structured_match_callstack mu m tm
(Frame cenv tfn e lenv te sp lo hi :: cs)
(Mem.nextblock m)
(Mem.nextblock tm))
n (MK : match_cont (Csharpminor.Kblock k) tk cenv xenv cs),
exists c2' : CMin_core,
exists m2' mu',
effstep_plus cmin_eff_sem tge EmptyEffect
(CMin_State tfn (Sexit (shift_exit xenv (S n))) tk (Vptr sp Int.zero) te) tm c2' m2' /\
Match_cores (CSharpMin_State f (Csharpminor.Sexit n) k e lenv) mu'
(CSharpMin_State f (Csharpminor.Sexit n) k e lenv) m c2' m2'
/\ intern_incr mu mu' /\
sm_inject_separated mu mu' m tm /\
sm_locally_allocated mu mu' m tm m m2' /\
SM_wd mu' /\ sm_valid mu' m m2'.
Lemma EFF_switch_MSI: forall
(MCS : structured_match_callstack mu m tm
(Frame cenv tfn e lenv te sp lo hi :: cs)
(Mem.nextblock m)
(Mem.nextblock tm))
ts ls body tk'
(TR: transl_lblstmt cenv (switch_env ls xenv) ls body = OK ts)
(MK: match_cont k tk cenv xenv cs)
(TK: transl_lblstmt_cont cenv xenv ls tk tk'),
exists S, exists m2' mu',
effstep_plus cmin_eff_sem tge EmptyEffect
(CMin_State tfn (Sexit O) tk' (Vptr sp Int.zero) te) tm S m2'
/\ Match_cores (CSharpMin_State f (seq_of_lbl_stmt ls) k e lenv) mu'
(CSharpMin_State f (seq_of_lbl_stmt ls) k e lenv) m
S m2'
/\ intern_incr mu mu' /\
sm_inject_separated mu mu' m tm /\
sm_locally_allocated mu mu' m tm m m2' /\
SM_wd mu' /\ sm_valid mu' m m2'.
Lemma EFF_step_case_Switch: forall
(MCS : structured_match_callstack mu m tm
(Frame cenv tfn e lenv te sp lo hi :: cs)
(Mem.nextblock m)
(Mem.nextblock tm))
a x x0 ts cases n
(MK : match_cont k tk cenv xenv cs)
(EvalA: Csharpminor.eval_expr ge e lenv m a (Vint n))
(EQ : transl_expr cenv a = OK (x, x0))
(EQ0 : transl_lblstmt cenv (switch_env cases xenv) cases
(Sswitch x (switch_table cases 0) (length (switch_table cases 0))) =
OK ts),
exists c2' : CMin_core,
exists m2' mu',
effstep_plus cmin_eff_sem tge EmptyEffect
(CMin_State tfn ts tk (Vptr sp Int.zero) te) tm c2' m2' /\
Match_cores (CSharpMin_State f (seq_of_lbl_stmt (select_switch n cases)) k e lenv) mu'
(CSharpMin_State f (seq_of_lbl_stmt (select_switch n cases)) k e lenv) m c2' m2'
/\ intern_incr mu mu' /\
sm_inject_separated mu mu' m tm /\
sm_locally_allocated mu mu' m tm m m2' /\
SM_wd mu' /\ sm_valid mu' m m2'.