(*+ Hoare logic (single thread) *)
(** We now build a Hoare logic for a single thread based on the oracular semantics (it can assume that acquire will give back a good map, but has to provide back good maps at release.) *)
Definition safe_onethread G P c :=
forall m, m |= P -> forall oracle, safe step (G, oracle, m, c).
Definition semax G P c Q := forall F k,
safe_onethread G (Q ** F) k ->
safe_onethread G (P ** F) (c ++ k).

Lemma updatemap_mapsto_ x n' n m :
(mapsto_ x m \/ mapsto x n' m) ->
exists m', updatemap m x n = Some m' /\ mapsto x n m'.