Local Open Scope logic.
Definition get_spec :=
DECLARE _get
WITH v : reptype' t_struct_c, p: val
PRE  []
PROP  ()
LOCAL (var _p t_struct_c p)
SEP   (`(data_at Ews t_struct_c (repinj _ v) p))
POST [ tint ]
PROP  ()
LOCAL (var _p t_struct_c p; temp 1%positive (Vint (snd (snd (snd v)))))
SEP   (`(data_at Ews t_struct_c (repinj _ v) p)).
Definition update222 (i: int) (v: reptype' t_struct_c) : reptype' t_struct_c :=
(fst v, (fst (snd v), (fst (snd (snd v)), i))).
Definition set_spec :=
DECLARE _set
WITH i : int, v : reptype' t_struct_c, p : val
PRE  [ _i OF tint ]
PROP ()
LOCAL(temp _i (Vint i); var _p t_struct_c p)
SEP(`(data_at Ews t_struct_c (repinj _ v) p))
POST [ tvoid ]
`(data_at Ews t_struct_c (repinj _ (update222 i v)) p).
Definition multi_command_spec :=
DECLARE _multi_command
WITH i111: int,
i112: int,
i121: int,
i122: int,
i211: int,
i212: int,
i221: int,
i222: int,
p: val
PRE  []
PROP ()
LOCAL(var _p t_struct_c p)
SEP(`(data_at Ews t_struct_c
(repinj t_struct_c (((i111, i112), (i121, i122)), ((i211, i212), (i221, i222)))) p))
POST [ tvoid ]
`(data_at Ews t_struct_c
(repinj t_struct_c (((i111, i112), (i121, i122)),
((Int.add i122 (Int.repr 4), Int.add i121 (Int.repr 3)),
(Int.add i112 (Int.repr 2), Int.add i111 (Int.repr 1))))) p).
Definition multi_command_spec' :=
DECLARE _multi_command
WITH i111: int,
i112: int,
i121: int,
i122: int,
i211: int,
i212: int,
i221: int,
i222: int,
p: val,
q: val
PRE  []
PROP ()
LOCAL(var _p t_struct_c p)
SEP(`(data_at Ews t_struct_c (default_val _) q);
`(data_at Ews t_struct_c
(repinj t_struct_c (((i111, i112), (i121, i122)), ((i211, i212), (i221, i222)))) p))
POST [ tvoid ]
`(data_at Ews t_struct_c (default_val _) q) *
`(data_at Ews t_struct_c
(repinj t_struct_c (((i111, i112), (i121, i122)),
((Int.add i122 (Int.repr 4), Int.add i121 (Int.repr 3)),
(Int.add i112 (Int.repr 2), Int.add i111 (Int.repr 1))))) p).
Definition multi_command_s_spec :=
DECLARE _multi_command_s
WITH p0: val,
p1: val,
p2: val,
p3: val,
p4: val,
p5: val,
p6: val,
p7: val
PRE  []
PROP ()
LOCAL(var _p0 tint p0;
var _p1 tint p1;
var _p2 tint p2;
var _p3 tint p3;
var _p4 tint p4;
var _p5 tint p5;
var _p6 tint p6;
var _p7 tint p7)
SEP(`(data_at Ews tint (Vint (Int.repr 0)) p0);
`(data_at Ews tint (Vint (Int.repr 0)) p1);
`(data_at Ews tint (Vint (Int.repr 0)) p2);
`(data_at Ews tint (Vint (Int.repr 0)) p3);
`(data_at Ews tint (Vint (Int.repr 0)) p4);
`(data_at Ews tint (Vint (Int.repr 0)) p5);
`(data_at Ews tint (Vint (Int.repr 0)) p6);
`(data_at Ews tint (Vint (Int.repr 0)) p7))
POST [ tvoid ]
PROP ()
LOCAL(var _p0 tint p0;
var _p1 tint p1;
var _p2 tint p2;
var _p3 tint p3;
var _p4 tint p4;
var _p5 tint p5;
var _p6 tint p6;
var _p7 tint p7)
SEP(`(data_at Ews tint (Vint (Int.repr 0)) p0);
`(data_at Ews tint (Vint (Int.repr 0)) p1);
`(data_at Ews tint (Vint (Int.repr 0)) p2);
`(data_at Ews tint (Vint (Int.repr 0)) p3);
`(data_at Ews tint (Vint (Int.repr 4)) p4);
`(data_at Ews tint (Vint (Int.repr 3)) p5);
`(data_at Ews tint (Vint (Int.repr 2)) p6);
`(data_at Ews tint (Vint (Int.repr 1)) p7)).
Definition Vprog : varspecs := (_p, t_struct_c)::
(_p0, tint)::
(_p1, tint)::
(_p2, tint)::
(_p3, tint)::
(_p4, tint)::
(_p5, tint)::
(_p6, tint)::
(_p7, tint)::
nil.
Definition Gprog : funspecs :=
multi_command_s_spec::multi_command_spec::nil.
(* Ltac lforward := start_timer "Forward"; forward.forward; stop_timer "Forward".  Clear Timing Profile.  Lemma body_multi_command: semax_body Vprog Gprog f_multi_command multi_command_spec.  Print Timing Profile. *)
(* Lemma body_multi_command2: semax_body Vprog Gprog f_multi_command multi_command_spec.  Lemma body_multi_command3: semax_body Vprog Gprog f_multi_command multi_command_spec'. *)
(* Clear Timing Profile. Lemma body_multi_command_s: semax_body Vprog Gprog f_multi_command_s multi_command_s_spec. *)
Print Timing Profile.
Require Export mc_reify.symexe_soundness.

(* Specifications: *)
(* Lemma body_multi_command_s2: semax_body Vprog nil f_multi_command_s multi_command_s_spec. Print Timing Profile. *)
Lemma body_multi_command4: semax_body Vprog nil f_multi_command multi_command_spec.