Section SOUNDNESS.
Variable prog: program.
Let ge := Genv.globalenv prog.
Hypothesis wt_prog:
forall i fd, In (i, Gfun fd) prog.(prog_defs) -> wt_fundef fd.
End SOUNDNESS.
(** Properties of well-typed states that are used in [Stackingproof]. *)

Lemma wt_state_builtin:
forall s f sp ef args res c rs m,
wt_state (State s f sp (Lbuiltin ef args res :: c) rs m) ->
forallb (loc_valid f) (params_of_builtin_args args) = true.