Instance CompSpecs : compspecs. make_compspecs prog. Defined.
Definition Vprog : varspecs. mk_varspecs prog. Defined.
Definition tlist := Tstruct _list noattr.
Definition tpile := Tstruct _pile noattr.
Definition sumlist : list Z -> Z := List.fold_right Z.add 0.
Definition pilerep (sigma: list Z) (p: val) : mpred :=
EX s:Z, !! (0 <= s <= Int.max_signed /\
Forall (Z.le 0) sigma /\
(0 <= sumlist sigma <= Int.max_signed -> s=sumlist sigma))
&&  data_at Ews tpile (Vint (Int.repr s)) p.
Definition pile_freeable (p: val) : mpred :=
malloc_token Ews tpile p.

Lemma pilerep_local_facts:
forall sigma p,
pilerep sigma p |-- !! (isptr p /\ Forall (Z.le 0) sigma).