Module CompilerCorrectness_implies_forward_simulation.
(*was:    (fun F C V Sem P => (forall x, Genv.init_mem P = Some x <-> initial_mem Sem (Genv.globalenv P) x P.(prog_defs)))*)
(* 1. The need for the axiom GenvHyp in all cases (or alternatively the addition of axioms HypGenv and HypVolatile, at the beginning of all cases): These are needed in order to apply external_call_symbols_preserved_gen, in order to establish external_call ef (GEnv P2) vargs m1 t vres m2, As mentioned in the file, an alternative proof of this fact using external_call_symbols_preserved_2 would require a slightly different axiom on globvars, eliminating the need for HypVolatile. Additionally, HypGenv is also explicitly required in order to discharge Xavier's condition fsim_symbols_preserved.  2. The need to establish a "meminj_preserves_globals" property in case inject-diamond-externalStep.  I temporarily added the condition meminj_preserves_globals jInit in cc_inj, with the idea that we would thread it through the execution. But meminj_preserves_globals is formally not preserved by inj_incr. But maybe the 3rd clause in meminj_preserves_globals is stronger than what's needed to prove the CompCert phases?  An alternative (maybe this is needed in any case) would be to have at_external (or maybe external_call ef ge vargs m1 t vres m2 in general) imply that (f,d) in ExternIdent, so that we can apply entries_ok or entries_inject_ok.  But: some externals_funstions ("builtins") dont have idents - so maybe ExternIdents should be of a different type, not take idents? Or maybe should differentiate in external_description between builtins and nonbuiltins?  It seems given the strong condition imposed by meminj_preserves_global, our choice to differentiate between entries_ok and entries_inject_ok is too fine for current CompCert. Maybe we soulh use entries_ok even in inject-case (at least for the sake of demonstrating that our approach works)? *)
End CompilerCorrectness_implies_forward_simulation.

Lemma transl_program_block_volatile:
forall {F FF V} (P: AST.program F V) (transf: F -> FF) b,
block_is_volatile (Genv.globalenv (AST.transform_program transf P)) b =
block_is_volatile (Genv.globalenv P) b.