Require VST.floyd.aggregate_pred. Import VST.floyd.aggregate_pred.aggregate_pred.
(*Require Import VST.floyd.unfold_data_at.*)
Definition body_lemma_of_funspec  {Espec: OracleKind} (ef: external_function) (f: funspec) :=
match f with mk_funspec sig _ A P Q _ _ =>
semax_external (map fst (fst sig)) ef A P Q
end.
Definition try_spec  (name: string) (spec: funspec) :
list (ident * globdef Clight.fundef type) -> list (ident*funspec) :=
fun defs =>
match ext_link_prog' defs name with
| Some id => [(id,spec)]
| None => nil
end.
Arguments try_spec name spec defs / .
Definition exit_spec' :=
WITH u: unit
PRE [1%positive OF tint]
PROP () LOCAL() SEP()
POST [ tvoid ]
PROP(False) LOCAL() SEP().
Definition exit_spec := try_spec "exit" exit_spec'.
Parameter body_exit:
forall {Espec: OracleKind},
body_lemma_of_funspec
(EF_external "exit"
{| sig_args := AST.Tint :: nil; sig_res := None; sig_cc := cc_default |})
exit_spec'.
Parameter mem_mgr: globals -> mpred.

Axiom create_mem_mgr: forall gv, emp |-- mem_mgr gv.
Parameter malloc_token : forall {cs: compspecs}, share -> type -> val -> mpred.