Section NOSTACK.
Variable bc: block_classification.
Hypothesis NOSTACK: bc_nostack bc.
End NOSTACK.
(** ** Construction 1: allocating the stack frame at function entry *)
Ltac splitall := repeat (match goal with |- _ /\ _ => split end).
(** Construction 2: turn the stack into an "other" block, at public calls or function returns *)
(** Construction 3: turn the stack into an invalid block, at private calls *)
(** Construction 4: restore the stack after a public call *)
(** Construction 5: restore the stack after a private call *)
(** Construction 6: external call *)

Theorem external_call_match:
forall ef (ge: genv) vargs m t vres m' bc rm am,
external_call ef ge vargs m t vres m' ->
genv_match bc ge ->
(forall v, In v vargs -> vmatch bc v Vtop) ->
romatch bc m rm ->
mmatch bc m am ->
bc_nostack bc ->
exists bc',
bc_incr bc bc'
/\ (forall b, Plt b (Mem.nextblock m) -> bc' b = bc b)
/\ vmatch bc' vres Vtop
/\ genv_match bc' ge
/\ romatch bc' m' rm
/\ mmatch bc' m' mtop
/\ bc_nostack bc'
/\ (forall b ofs n, Mem.valid_block m b -> bc b = BCinvalid -> Mem.loadbytes m' b ofs n = Mem.loadbytes m b ofs n).