Definition unOp_result_type op t :=
match op with
| Cop.Onotbool =>match t with
| Tint _ _ _ => Tint IBool Signed noattr
| Tlong _ _ => Tint IBool Signed noattr
| Tpointer _ _ => Tint I32 Signed noattr
| Tfloat _ _ => Tint IBool Signed noattr
| Tarray _ _ _ => Tint IBool Signed noattr
| Tfunction _ _ _ => Tint IBool Signed noattr
| _ => Tvoid
end
| Cop.Onotint => match t with
| Tint _ _ _ => Tint I32 Signed noattr
| Tlong _ _ => Tlong Signed noattr
| _ => Tvoid
end
| Cop.Oneg => match t with
| Tint _ _ _ => Tint I32 Signed noattr
| Tlong _ _ => Tlong Signed noattr
| Tfloat _ _ => t
| _ => Tvoid
end
| Cop.Oabsfloat => t
end.

(* Specifications: *)
Lemma tc_bool_e: forall {CS: compspecs} b a rho m, (* copied from binop_lemmas.v *)
app_pred (denote_tc_assert (tc_bool b a) rho) m ->
b = true.
Lemma tc_val_of_bool_int_type:
forall b t, is_int_type t = true ->
tc_val t (Val.of_bool b).
Lemma typecheck_unop_sound:
forall {CS: compspecs} Delta rho m u e t
(H: typecheck_environ Delta rho)
(IHe: (denote_tc_assert (typecheck_expr Delta e) rho m ->
tc_val (typeof e) (eval_expr e rho)) /\
(forall pt : type,
denote_tc_assert (typecheck_lvalue Delta e) rho m ->
is_pointer_type pt = true ->
tc_val pt (eval_lvalue e rho)))
(H0: denote_tc_assert (typecheck_expr Delta (Eunop u e t)) rho m),
tc_val t (eval_expr (Eunop u e t) rho).
Lemma same_base_tc_val : forall v t1 t2,
same_base_type t1 t2 = true ->
tc_val t1 v ->
tc_val t2 v.
Lemma typecheck_temp_sound:
forall {CS: compspecs} Delta rho m i t,
typecheck_environ Delta rho ->
denote_tc_assert (typecheck_expr Delta (Etempvar i t)) rho m ->
tc_val (typeof (Etempvar i t)) (eval_expr (Etempvar i t) rho).
Lemma typecheck_deref_sound:
forall {CS: compspecs} Delta rho m e t pt,
typecheck_environ Delta rho ->
(denote_tc_assert (typecheck_expr Delta e) rho m ->
tc_val (typeof e) (eval_expr e rho)) /\
(forall pt0 : type,
denote_tc_assert (typecheck_lvalue Delta e) rho m ->
is_pointer_type pt0 = true -> tc_val pt0 (eval_lvalue e rho)) ->
denote_tc_assert (typecheck_lvalue Delta (Ederef e t)) rho m ->
is_pointer_type pt = true ->
tc_val pt (eval_lvalue (Ederef e t) rho).