(** *Event semantics for Clight_new*)
(* This should be a version of CLN_memsem annotated with memory events.*)
Program Definition CLN_evsem ge : @EvSem C := {| msem := CLN_memsem ge; ev_step := cl_evstep ge |}.
Next Obligation. apply CLN_evstep_ax1. Qed.
Next Obligation. apply CLN_evstep_ax2. Qed.
Next Obligation. apply CLN_evstep_fun. Qed.
Next Obligation. apply CLN_evstep_elim. Qed.

(* Specifications: *)
Lemma CLN_msem : forall ge, msem (CLN_evsem ge) = CLN_memsem ge.
Lemma at_external_SEM_eq:
forall ge c m, semantics.at_external (CLN_evsem ge) c m =
match c with
| State _ _ _ => None
| ExtCall ef args _ _ _ _ => Some (ef, args)
end.
Lemma builtin_event_determ ef m vargs T1 (BE1: builtin_event ef m vargs T1) T2 (BE2: builtin_event ef m vargs T2): T1=T2.
inversion BE1; inv BE2; try discriminate; try contradiction; simpl in *; trivial.