Notation "s #2" := (snd s) (at level 9, format "s '#2'") : pair_scope.Definition world_sem : semantics := @Semantics_gen
  (state L * world)%type
  (genvtype L)
  (fun s => get_mem( fst s))
  (fun s m => (set_mem (fst s) m, snd s))
  (fun s t s' => step L s#1 t s'#1 /\ possible_trace s#2 t s'#2)
  (fun m0 s f args => entry_point L m0 s#1 f args /\ s#2 = initial_world)
  (*fun s => initial_state L s#1 /\ s#2 = initial_world*)
  (fun s => at_external L s#1 )
  (fun r s m  => option_map (fun s1=> (s1, s#2))(after_external L r s#1 m) )
  (fun s r => final_state L s#1 r)
  (globalenv L)
  (main_block L)
  (init_mem L)
  (symbolenv L).

(* Specifications: *)
Theorem world_sem_deterministic: sem_deterministic world_sem.