Definition main_params (ge: genv) start : Prop :=
exists b, exists func,
Genv.find_symbol ge start = Some b /\
Genv.find_funct ge (Vptr b Ptrofs.zero) = Some (Internal func) /\
func.(fn_params) = nil.

(* Specifications: *)
Lemma in_prog_funct'_in {F V}:
forall i f (g: list (ident * globdef F V)), In (i,f) (prog_funct' g) -> In (i, Gfun f) g.
Lemma in_prog_funct_in_prog_defs:
forall i f prog, In (i,f) (prog_funct prog) -> In (i, Gfun f) (prog_defs prog).
Lemma in_prog_vars_in_prog_defs:
forall i v prog, In (i,v) (prog_vars prog) -> In (i, Gvar v) (prog_defs prog).
Lemma find_funct_ptr_exists:
forall (p: program) id f,
list_norepet (prog_defs_names p) ->
In (id, Gfun f) (prog_defs p) ->
exists b,
Genv.find_symbol (Genv.globalenv p) id = Some b
/\ Genv.find_funct_ptr (Genv.globalenv p) b = Some f.
Lemma funassert_initial_core:
forall (prog: program) ve te V G n,
list_norepet (prog_defs_names prog) ->
match_fdecs (prog_funct prog) G ->
app_pred (funassert (nofunc_tycontext V G) (mkEnviron (filter_genv (globalenv prog)) ve te))
(initial_core (Genv.globalenv prog) G n).
Lemma prog_contains_prog_funct: forall prog: program,
list_norepet (prog_defs_names prog) ->
prog_contains (globalenv prog) (prog_funct prog).
Lemma funassert_initial_core_ext:
forall (ora : OK_ty) (prog: program) ve te V G n,
list_norepet (prog_defs_names prog) ->
match_fdecs (prog_funct prog) G ->
app_pred (funassert (nofunc_tycontext V G) (mkEnviron (filter_genv (globalenv prog)) ve te))
(initial_core_ext ora (Genv.globalenv prog) G n).
(* there's a place this lemma should be applied, perhaps in proof of semax_call *)
Lemma funassert_rho:
forall G rho rho', ge_of rho = ge_of rho' -> funassert G rho |-- funassert G rho'.
Lemma core_inflate_initial_mem':
forall (ora : OK_ty) (m: mem) (prog: program) (G: funspecs) (n: nat)
(INIT: Genv.init_mem prog = Some m),
match_fdecs (prog_funct prog) G ->
list_norepet (prog_defs_names prog) ->
core (inflate_initial_mem m (initial_core_ext ora (Genv.globalenv prog) G n)) =
initial_core (Genv.globalenv prog) G n.