Re: separate compilation (was: A lesson for compiler warning writers)

waldin@lcs.mit.edu
Mon, 22 Jun 1992 15:27:37 GMT

          From comp.compilers

Related articles
Re: separate compilation (was: A lesson for compiler warning writers) sommerfeld@apollo.hp.com (1992-06-19)
Re: separate compilation (was: A lesson for compiler warning writers) waldin@lcs.mit.edu (1992-06-22)
| List of all articles for this month |
Newsgroups: comp.compilers
From: waldin@lcs.mit.edu
Keywords: linker, design
Organization: Laboratory for Computer Science, MIT
References: <19920609091040SEB1525@MVS.draper.com> 92-06-097
Date: Mon, 22 Jun 1992 15:27:37 GMT

sommerfeld@apollo.hp.com (Bill Sommerfeld) writes:
|> The CLU compiler I used while a student at MIT only maintained the
|> "interface database" for the lifetime of the compiler process. (The
|> compiler was an interactive program.. you fire it up, then typed in a
|> bunch of "compile x.clu", "compile y.clu", "compile z.clu" commands).
|>
|> This broke down pretty badly if you tried to automate recompiles using
|> make, as it "forgot" all the cross-module state and assumed that
|> references to externals were all type-correct (much like C).


As a long-time member of the MIT CLU community and former teaching
assistant for courses that teach and use CLU, I would like to point out
that the above is not quite correct. It is true that the compilation
environment (i.e., the "interface database") is only _active_ during the
lifetime of the compiler process. However, there are compiler commands
for dumping/restoring the environment to/from a file, which allows the
environment to be used over multiple compilation sessions.


It is also possible to create separate compilation environments and merge
them. For example, assume A, B and C are "subsystems" (i.e., they are
composed of a number of modules) where B and C are independent, and A uses
both B and C. Then you would create a separate environment for compiling B
and C. To compile A, you would merge the environments for B and C as part
of creating the environment for A.


CLU takes its command input from the standard input, so it can be run both
interactively and in batch mode. I have several make files for compiling
and linking CLU code that completely automate inter-module type checking.


As a former teaching assistant I'll have to admit that we did not teach
students about using tools with CLU. There's just so much to teach in one
semester. Now that the course has been (officially) upgraded from 12 to
15 units, we teach them how to use both make and RCS.


Earl Waldin
waldin@lcs.mit.edu
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.