End EFF_INJ_SIMULATION_STAR.
Section EFF_INJ_SIMULATION_PLUS.
Variable measure: C1 -> nat.
Hypothesis inj_core_diagram :
forall st1 m1 st1' m1',
corestep Sem1 ge1 st1 m1 st1' m1' ->
forall st2 mu m2,
match_states st1 mu st1 m1 st2 m2 ->
exists st2', exists m2', exists mu',
intern_incr mu mu' /\
sm_inject_separated mu mu' m1 m2 /\
sm_locally_allocated mu mu' m1 m2 m1' m2' /\
match_states st1' mu' st1' m1' st2' m2' /\
SM_wd mu' /\ sm_valid mu' m1' m2' /\
((corestep_plus Sem2 ge2 st2 m2 st2' m2') \/
((measure st1' < measure st1)%nat /\ corestep_star Sem2 ge2 st2 m2 st2' m2')).
Hypothesis inj_effcore_diagram :
forall st1 m1 st1' m1' U1,
effstep Sem1 ge1 U1 st1 m1 st1' m1' ->
forall st2 mu m2
(UHyp: forall b ofs, U1 b ofs = true -> Mem.valid_block m1 b ->
vis mu b = true),
match_states st1 mu st1 m1 st2 m2 ->
exists st2', exists m2', exists mu',
intern_incr mu mu' /\
sm_inject_separated mu mu' m1 m2 /\
sm_locally_allocated mu mu' m1 m2 m1' m2' /\
match_states st1' mu' st1' m1' st2' m2' /\
exists U2,
(effstep_plus Sem2 ge2 U2 st2 m2 st2' m2' \/
((measure st1' < measure st1)%nat /\ effstep_star Sem2 ge2 U2 st2 m2 st2' m2'))
/\
forall b ofs, U2 b ofs = true ->
(Mem.valid_block m2 b /\
(locBlocksTgt mu b = false ->
exists b1 delta1, foreign_of mu b1 = Some(b,delta1) /\
U1 b1 (ofs-delta1) = true /\
Mem.perm m1 b1 (ofs-delta1) Max Nonempty)).

(* Specifications: *)
Lemma inj_simulation_plus:
SM_simulation.SM_simulation_inject Sem1 Sem2 ge1 ge2 entry_points.