Instance CompSpecs : compspecs. make_compspecs prog. Defined.
Definition Vprog : varspecs. mk_varspecs prog. Defined.
Definition t_struct_list := Tstruct _list noattr.
Fixpoint listrep (sh: share)
(contents: list val) (x: val) : mpred :=
match contents with
| h::hs =>
EX y:val,
data_at sh t_struct_list (h,y) x * listrep sh hs y
| nil => !! (x = nullval) && emp
end.
Arguments listrep sh contents x : simpl never.

(* Specifications: *)
Lemma listrep_local_facts:
forall sh contents p,
listrep sh contents p |--
!! (is_pointer_or_null p /\ (p=nullval <-> contents=nil)).