Hint Resolve check_rval_wt check_lval_wt: ty.
Hint Extern 1 (wt_expr _ _ _) => (unfold wt_expr; simpl): ty.

(* Specifications: *)
Lemma evar_sound:
forall x a, evar e x = OK a -> wt_expr ce e a.
Lemma ederef_sound:
forall r a, ederef r = OK a -> wt_expr ce e r -> wt_expr ce e a.
Lemma efield_sound:
forall r f a, efield ce r f = OK a -> wt_expr ce e r -> wt_expr ce e a.
Lemma econst_int_sound:
forall n sg, wt_expr ce e (econst_int n sg).
Lemma econst_ptr_int_sound:
forall n ty, wt_expr ce e (econst_ptr_int n ty).
Lemma econst_long_sound:
forall n sg, wt_expr ce e (econst_long n sg).
Lemma econst_ptr_long_sound:
forall n ty, wt_expr ce e (econst_ptr_long n ty).
Lemma econst_float_sound:
forall n, wt_expr ce e (econst_float n).
Lemma econst_single_sound:
forall n, wt_expr ce e (econst_single n).
Lemma evalof_sound:
forall l a, evalof l = OK a -> wt_expr ce e l -> wt_expr ce e a.
Lemma eaddrof_sound:
forall l a, eaddrof l = OK a -> wt_expr ce e l -> wt_expr ce e a.
Lemma eunop_sound:
forall op r a, eunop op r = OK a -> wt_expr ce e r -> wt_expr ce e a.
Lemma ebinop_sound:
forall op r1 r2 a, ebinop op r1 r2 = OK a -> wt_expr ce e r1 -> wt_expr ce e r2 -> wt_expr ce e a.
Lemma ecast_sound:
forall ty r a, ecast ty r = OK a -> wt_expr ce e r -> wt_expr ce e a.
Lemma eseqand_sound:
forall r1 r2 a, eseqand r1 r2 = OK a -> wt_expr ce e r1 -> wt_expr ce e r2 -> wt_expr ce e a.
Lemma eseqor_sound:
forall r1 r2 a, eseqor r1 r2 = OK a -> wt_expr ce e r1 -> wt_expr ce e r2 -> wt_expr ce e a.
Lemma econdition_sound:
forall r1 r2 r3 a, econdition r1 r2 r3 = OK a ->
wt_expr ce e r1 -> wt_expr ce e r2 -> wt_expr ce e r3 -> wt_expr ce e a.
Lemma econdition'_sound:
forall r1 r2 r3 ty a, econdition' r1 r2 r3 ty = OK a ->
wt_expr ce e r1 -> wt_expr ce e r2 -> wt_expr ce e r3 -> wt_expr ce e a.
Lemma esizeof_sound:
forall ty, wt_expr ce e (esizeof ty).
Lemma ealignof_sound:
forall ty, wt_expr ce e (ealignof ty).
Lemma eassign_sound:
forall l r a, eassign l r = OK a -> wt_expr ce e l -> wt_expr ce e r -> wt_expr ce e a.
Lemma eassignop_sound:
forall op l r a, eassignop op l r = OK a -> wt_expr ce e l -> wt_expr ce e r -> wt_expr ce e a.
Lemma epostincrdecr_sound:
forall id l a, epostincrdecr id l = OK a -> wt_expr ce e l -> wt_expr ce e a.
Lemma ecomma_sound:
forall r1 r2 a, ecomma r1 r2 = OK a -> wt_expr ce e r1 -> wt_expr ce e r2 -> wt_expr ce e a.
Lemma ecall_sound:
forall fn args a, ecall fn args = OK a -> wt_expr ce e fn -> wt_exprlist ce e args -> wt_expr ce e a.
Lemma ebuiltin_sound:
forall ef tyargs args tyres a,
ebuiltin ef tyargs args tyres = OK a -> wt_exprlist ce e args -> wt_expr ce e a.
Lemma sdo_sound:
forall a s, sdo a = OK s -> wt_expr ce e a -> wt_stmt ce e rt s.
Lemma sifthenelse_sound:
forall a s1 s2 s, sifthenelse a s1 s2 = OK s ->
wt_expr ce e a -> wt_stmt ce e rt s1 -> wt_stmt ce e rt s2 -> wt_stmt ce e rt s.
Lemma swhile_sound:
forall a s1 s, swhile a s1 = OK s ->
wt_expr ce e a -> wt_stmt ce e rt s1 -> wt_stmt ce e rt s.
Lemma sdowhile_sound:
forall a s1 s, sdowhile a s1 = OK s ->
wt_expr ce e a -> wt_stmt ce e rt s1 -> wt_stmt ce e rt s.
Lemma sfor_sound:
forall s1 a s2 s3 s, sfor s1 a s2 s3 = OK s ->
wt_stmt ce e rt s1 -> wt_expr ce e a -> wt_stmt ce e rt s2 -> wt_stmt ce e rt s3 ->
wt_stmt ce e rt s.
Lemma sreturn_sound:
forall a s, sreturn rt a = OK s -> wt_expr ce e a -> wt_stmt ce e rt s.
Lemma sswitch_sound:
forall a sl s, sswitch a sl = OK s ->
wt_expr ce e a -> wt_lblstmts ce e rt sl -> wt_stmt ce e rt s.
Lemma retype_expr_sound:
forall a a', retype_expr ce e a = OK a' -> wt_expr ce e a'
with retype_exprlist_sound:
forall al al', retype_exprlist ce e al = OK al' -> wt_exprlist ce e al'.
Lemma retype_stmt_sound:
forall s s', retype_stmt ce e rt s = OK s' -> wt_stmt ce e rt s'
with retype_lblstmts_sound:
forall sl sl', retype_lblstmts ce e rt sl = OK sl' -> wt_lblstmts ce e rt sl'.