Definition module_fifo : module := {|
mf_rep := fifo;
mf_Gimport := (mallocN_spec :: freeN_spec :: nil);
mf_Gexport := (fifo_new_spec :: fifo_put_spec
:: fifo_empty_spec :: fifo_get_spec :: nil);
mf_Gintern := nil;
mf_V := nil;
mf_funs := ((_fifo_new, Internal f_fifo_new) ::
(_fifo_put, Internal f_fifo_put) ::
(_fifo_empty, Internal f_fifo_empty) ::
(_fifo_get, Internal f_fifo_get) :: nil);
mf_funs_correct := funcs_correct
|}.
(***************************************************)
Definition make_elem_spec :=
DECLARE _make_elem
WITH a: int, b: int
PRE  [ _a OF tint, _b OF tint ]
PROP() LOCAL(`(eq (Vint a)) (eval_id _a); `(eq (Vint b)) (eval_id _b)) SEP()
POST [ (tptr t_struct_elem) ] `(elemrep (a,b)) retval.
Definition main_spec :=
DECLARE _main
WITH u : unit
PRE  [] main_pre prog u
POST [ tint ] main_post prog u.
Definition Vprog : varspecs := nil.
Definition Gprog : funspecs :=   ltac:(with_library prog
(mallocN_spec :: freeN_spec ::
(map (fun f => f module_fifo.(mf_rep)) module_fifo.(mf_Gexport))
++ make_elem_spec :: main_spec::nil)).
Definition Gtot := do_builtins (prog_defs prog) ++ Gprog.

(* Specifications: *)
Lemma body_make_elem: semax_body Vprog Gtot f_make_elem make_elem_spec.
Admitted.
Lemma body_main:  semax_body Vprog Gtot f_main main_spec.
Admitted.