Re: Help on smart recompilation (JR a.k.a. John Rogers)
16 Feb 92 10:47:36 GMT

          From comp.compilers

Related articles
Help on smart recompilation (Clement Cheung) (1992-02-13)
Re: Help on smart recompilation (1992-02-16)
Re: Help on smart recompilation (1992-02-16)
Re: Help on smart recompilation (1992-02-17)
Re: Help on smart recompilation (1992-02-17)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (JR a.k.a. John Rogers)
Summary: Keep code in ASTs (parsed) and use that.
Keywords: tools, syntax
Organization: Microsoft Corp.
References: 92-02-069
Date: 16 Feb 92 10:47:36 GMT

In article 92-02-069, Clement Cheung writes:
> I got hold on two papers on smart recompilation. And I quote "Smart
> recompilation is the method of reducing the set of modules that must be
> recompiled after a change. The method determines whether recompilation is
> necessary by isolating the differences among program modules and analyzing
> the effect of changes."

I've got some experience using one implementation of smart recompilation.
It was with an Ada system called the Rational Development System. It was
an incredible software development environment, and I've used a bunch in
my day. It kept code in abstract syntax trees (ASTs), if I remember
correctly. The source code editor was a structured editor, and so you
told it what you were adding to do. If all you did was change a comment,
or add something to a spec (similar to C's header file), it generally
didn't need to recompile anything. And it kept a list of where each thing
was used, so you could also delete things from specs without causing
recompiles if there weren't any references to those things anymore.

There were other benefits to this implementation. It made browsing for
things easier than grepping for them across however-many directories.
Recompiles were quick, because the source was already syntax checked and
in AST format. In fact, the recompile was limited to portion of the code
that needed to be recompiled. Certainly it could recompile just one
routine in a file of many. Perhaps it could even get down to the
statement level.

On a million-line project, it doesn't matter how fast the compiler is.
It's better to architect things intelligently. Using "smart
recompilation" is the way to go, if you ask me.

P.S. If you're seriously interested in how the Rational system works,
it's based on a variant of DIANA. I know I can find references on DIANA
(including what it stands for, which eludes me at the moment). I'm not
sure I can find more information on the Rational's implementation of smart
recompilation, but I'd be happy to try.
--JR (John Rogers, JohnRo@Microsoft.UUCP)
UUCP: {uunet,decwrl,sun,uw-beaver}!microsoft!johnro

Post a followup to this message

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