Instance CompSpecs : compspecs. make_compspecs prog. Defined.
Definition Vprog : varspecs. mk_varspecs prog. Defined.
Local Open Scope logic.
Definition t_struct_b := Tstruct _b noattr.
Definition sub_spec (sub_id: ident) :=
DECLARE sub_id
WITH v : val * list (val*val) , gv: globals
PRE  []
PROP  (is_int I8 Signed (snd (nth 1%nat (snd v) (Vundef, Vundef))))
LOCAL (gvars gv)
SEP   (data_at Ews t_struct_b v (gv _p))
POST [ tvoid ]
PROP() LOCAL()
SEP(data_at Ews t_struct_b (snd (nth 1%nat (snd v) (Vundef, Vundef)), snd v) (gv _p)).
Definition sub_spec' (sub_id: ident) :=
DECLARE sub_id
WITH v : reptype t_struct_b, gv: globals
PRE  []
PROP  (is_int I8 Signed (proj_reptype _ (DOT _y2 SUB 1 DOT _x2) v))
LOCAL (gvars gv)
SEP   (data_at Ews t_struct_b v (gv _p))
POST [ tvoid ]
PROP() LOCAL()
SEP(data_at Ews t_struct_b
(upd_reptype t_struct_b (DOT _y1) v
(proj_reptype t_struct_b (StructField _x2 :: ArraySubsc 1 :: StructField _y2 :: nil) v))
(gv _p)).

Lemma spec_coincide: sub_spec' = sub_spec.