Definition append_spec :=
DECLARE _append
WITH sh : share, x: val, y: val, s1: list val, s2: list val
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).
Definition Gprog : funspecs :=   ltac:(with_library prog [ append_spec ]).
Module Proof1.
Definition lseg (sh: share) (contents: list val) (x z: val) : mpred :=
ALL cts2:list val, listrep sh cts2 z -* listrep sh (contents++cts2) x.

Lemma body_append: semax_body Vprog Gprog f_append append_spec.
End Proof1.