Instance CompSpecs : compspecs. make_compspecs prog. Defined.
Definition Vprog : varspecs. mk_varspecs prog. Defined.
Definition tlist := Tstruct _list noattr.
Definition tpile := Tstruct _pile noattr.
Fixpoint listrep (sigma: list Z) (x: val) : mpred :=
match sigma with
| h::hs =>
EX y:val,
!! (0 <= h <=  Int.max_signed) &&
data_at Ews tlist (Vint (Int.repr h), y) x
* malloc_token Ews tlist x
*  listrep hs y
| nil =>
!! (x = nullval) && emp
end.
Hint Resolve listrep_local_facts : saturate_local.
Hint Resolve listrep_valid_pointer : valid_pointer.
Definition pilerep (sigma: list Z) (p: val) : mpred :=
EX x:val, data_at Ews tpile x p
* listrep sigma x.
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).