Module VerifAppend.
Definition append_spec (_append: ident) :=
DECLARE _append
WITH sh : share, x: val, y: val, s1: list int, s2: list int
PRE [ _x OF (tptr t_struct_list) , _y OF (tptr t_struct_list)]
PROP(writable_share sh)
LOCAL (temp _x x; temp _y y)
SEP (listrep sh s1 x; listrep sh s2 y)
POST [ tptr t_struct_list ]
EX r: val,
PROP()
LOCAL(temp ret_temp r)
SEP (listrep sh (s1++s2) r).
Module VerifAppend1.
Definition append1_spec := append_spec _append1.
Definition Gprog : funspecs :=
ltac:(with_library prog [ append1_spec ]).
Module ProofByNoWandBad.

Lemma body_append1: semax_body Vprog Gprog f_append1 append1_spec.
End ProofByNoWandBad.