(** * Extension to separate compilation *)
(** The results above were given in terms of whole-program compilation. They also extend to separate compilation followed by linking. *)
Section SEPARATE_COMPILATION.
(** The source: a list of C compilation units *)
Variable c_units: nlist Csyntax.program.
(** The compiled code: a list of Asm compilation units, obtained by separate compilation *)
Variable asm_units: nlist Asm.program.
Hypothesis separate_compilation_succeeds:
nlist_forall2 (fun cu tcu => transf_c_program cu = OK tcu) c_units asm_units.
(** We assume that the source C compilation units can be linked together to obtain a monolithic C program [c_program]. *)
Variable c_program: Csyntax.program.
Hypothesis source_linking: link_list c_units = Some c_program.

(* Specifications: *)
(** Then, linking the Asm units obtained by separate compilation succeeds. *)
Lemma compiled_linking_succeeds:
{ asm_program | link_list asm_units = Some asm_program }.