Ltac UseFinish :=
match goal with
| [ H: finish _ _ _ = (_, _) |- _ ] =>
try (rewrite (finish_meets_spec_2 _ _ _ _ _ H));
try (rewrite (finish_meets_spec_1 _ _ _ _ _ H));
repeat rewrite app_ass
end.
(* Fixpoint add_set_dest (sd: set_destination) (tmps: list ident) := match sd with | SDbase ty tmp => tmp :: tmps | SDcons ty tmp sd' => tmp :: add_set_dest sd' tmps end. *)
Definition add_dest (dst: destination) (tmps: list ident) :=
match dst with
| For_set sd => sd_temp sd :: tmps
| _ => tmps
end.

(* Specifications: *)
Lemma add_dest_incl:
forall dst tmps, incl tmps (add_dest dst tmps).
Lemma tr_expr_add_dest:
forall le dst r sl a tmps,
tr_expr le dst r sl a tmps ->
tr_expr le dst r sl a (add_dest dst tmps).
Lemma transl_valof_meets_spec:
forall ty a g sl b g' I,
transl_valof ty a g = Res (sl, b) g' I ->
exists tmps, tr_rvalof ty a sl b tmps /\ contained tmps g g'.