(** * Correctness of Cminor construction functions *)
(** Correctness of the variable accessor [var_addr] *)

Lemma var_addr_correct:
forall cenv id f tf e le te sp lo hi m cs tm b,
match_callstack f m tm (Frame cenv tf e le te sp lo hi :: cs) (Mem.nextblock m) (Mem.nextblock tm) ->
eval_var_addr ge e id b ->
exists tv,
eval_expr tge (Vptr sp Ptrofs.zero) te tm (var_addr cenv id) tv
/\ Val.inject f (Vptr b Ptrofs.zero) tv.