Local Open Scope logic.
Fixpoint argtypes (al: list (ident * type)) : list type :=
match al with (_,t)::al' => t :: argtypes al' | nil => nil end.

(* Specifications: *)
Lemma argtypes_eq: forall al, argtypes al = snd (split al).
Definition maybe_retval (Q: environ -> mpred) retty ret :=
match ret with
| Some id => fun rho => Q (get_result1 id rho)
| None =>
match retty with
| Tvoid => (fun rho => Q (globals_only rho))
| _ => fun rho => EX v: val, Q (make_args (ret_temp::nil) (v::nil) rho)
end
end.