(** List linking with a composition of compilation passes. *)

(* Specifications: *)
Theorem link_list_compose_passes:
forall (src tgt: Language) (passes: Passes src tgt)
(src_units: nlist src) (tgt_units: nlist tgt),
nlist_forall2 (pass_match (compose_passes passes)) src_units tgt_units ->
forall src_prog,
@link_list _ (lang_link src) src_units = Some src_prog ->
exists tgt_prog,
@link_list _ (lang_link tgt) tgt_units = Some tgt_prog
/\ pass_match (compose_passes passes) src_prog tgt_prog.
Theorem link_list_compose_passes:
forall (src tgt: Language) (passes: Passes src tgt)
(src_units: nlist src) (tgt_units: nlist tgt),
nlist_forall2 (pass_match (compose_passes passes)) src_units tgt_units ->
forall src_prog,
@link_list _ (lang_link src) src_units = Some src_prog ->
exists tgt_prog,
@link_list _ (lang_link tgt) tgt_units = Some tgt_prog
/\ pass_match (compose_passes passes) src_prog tgt_prog.