A Framework for Selective Recompilation in the Presence of Complex Intermodule Dependencies

Compilers and other programming environment tools derive information from the source code of programs; derived information includes compiled code, interprocedurrd summary information, and call graph views. If the source program changes, the derived information needs to be updated. We present a simple framework for maintaining interrnodule dependencies, embodying different tradeoffs in terms of space usage, speed of processing, and selectivity of invalidation, that eases the implementation of incremental update of derived information. Our framework augments a directed acyclic graph representation of dependencies with factoring nodes (to save space) and filtering nodes (to increase selectivity), and it includes an algorithm for efficient invalidation processing. We show how several schemes for selective recompilation, such as smart recompilation, filter sets for interprocedural summary information, and dependencies for whole-program optimization of object-oriented languages, map naturally onto our framework. For this latter application, by exploiting the facilities of our framework, we are able to reduce the number of lines of source code recompiled by a factor of seven over a header file-based scheme, and by a factor of two over the previous state-of-the-art selective dependency mechanism without consuming additional space.

[1]  J. Davenport Editor , 1960 .

[2]  Stuart I. Feldman,et al.  Make — a program for maintaining computer programs , 1979, Softw. Pract. Exp..

[3]  David Robson,et al.  Smalltalk-80: The Language and Its Implementation , 1983 .

[4]  Manfred Dausmann Informationsstrukturen und Verfahren für die getrennte Übersetzung von Programmteilen , 1985 .

[5]  Walter F. Tichy,et al.  Smart recompilation , 1986, TOPL.

[6]  Randall B. Smith,et al.  SELF: The power of simplicity , 1987, OOPSLA '87.

[7]  Randall B. Smith,et al.  Self: The power of simplicity , 1987, OOPSLA 1987.

[8]  F. J. Newbery Edge concentration: a method for clustering directed graphs , 1989 .

[9]  Craig Chambers,et al.  An efficient implementation of SELF, a dynamically-typed object-oriented language based on prototypes , 1989, OOPSLA '89.

[10]  Craig Chambers,et al.  Making pure object-oriented languages practical , 1991, OOPSLA '91.

[11]  Bjarne Stroustrup,et al.  The C++ Programming Language, Second Edition , 1991 .

[12]  Bjarne Stroustrup,et al.  The C++ programming language (2nd ed.) , 1991 .

[13]  David Notkin,et al.  Reconciling environment integration and software evolution , 1992, TSEM.

[14]  Craig Chambers,et al.  The design and implementation of the self compiler, an optimizing compiler for object-oriented programming languages , 1992 .

[15]  Craig Chambers,et al.  The cecil language: specification and rationale , 1993 .

[16]  John M. Mellor-Crummey,et al.  FIAT: A Framework for Interprocedural Analysis and Transfomation , 1993, LCPC.

[17]  Andrew W. Appel,et al.  Smartest recompilation , 1993, POPL '93.

[18]  Alberto Marchetti-Spaccamela,et al.  On-line Graph Algorithms for Incremental Compilation , 1993, WG.

[19]  Linda Torczon,et al.  Interprocedural optimization: eliminating unnecessary recompilation , 1986, SIGPLAN '86.

[20]  Rolf Adams,et al.  The cost of selective recompilation and environment processing , 1994, TSEM.