Development system with improved methods for recompiling dependent code modules
First Claim
1. In a development system for creating a software program by a process which includes compiling a hierarchy of interdependent source code modules, wherein some of the source code modules are dependent on imports comprising symbol information imported from others of the source code modules, a method for recompiling only those particular source code modules which require recompilation when a modification occurs to any one of said source code modules, the method comprising:
- (a) beginning with a source code module which serves as a root source code module of said hierarchy of interdependent source code modules, determining whether a particular source code module under examination has itself been modified;
(b) if the particular source code module has itself been modified, recompiling the particular source code module, including invoking the method for each source code module which provides imports to the particular source code module, for determining which source code modules providing imports require recompilation, and thereafter terminating execution of the method; and
(c) if the particular source code module has not itself been modified, examining each import of the particular source code module by performing substeps of;
(i) if none of the imports have themselves been modified since last compiling the particular source code module, terminating execution of the method,(ii) if some of the imports have themselves been modified since last compiling the particular source code module, invoking the method for each source code module which provides imports to the particular source code module, for determining which source code modules providing imports require recompilation,(iii) if any of the imports have been recompiled and if the particular source code module extends from imports which have changed symbol information and which have been recompiled, recompiling the particular source code module and thereafter terminating execution of the method, and(iv) if any of the imports have been recompiled and if the particular source code module does not extend from imports which have changed symbol information and which have been recompiled, performing substeps of;
determining whether any of the imports include a symbol which has changed and which is used by the particular source code module, andrecompiling the particular source code module if any import includes a symbol which has changed and which is used by the particular source code module, and thereafter terminating execution of the method.
10 Assignments
0 Petitions
Accused Products
Abstract
A development system providing methodology for improving system performance by decreasing recompilation of dependent source modules is described. During operation, the system keeps track of several pieces of information. From the outset, the system has kept track of the timestamps of sources (e.g., A.java file in a Java system) and compiled files thereof (e.g., A.class class file in a Java system). Examination of the timestamps leads to detection of those files which have been modified. The system will recompile A.java in the following circumstances: (1) A.class is not found, (2) A.java has a different timestamp, or (3) A.class has a different timestamp. Otherwise, the system does not invoke a recompile. If a recompilation in not required, the system then looks to the imports for determining whether the imports are consistent. Here, the system checks the timestamps of imports, possibly recompiling one or more of the modules providing the imports. If the imports have been recompiled, then the system must check the root module for determining whether it remains consistent with the imports--that is, whether A is still consistent with its imports. If not, the system recompiles the source file (e.g., A.java).
111 Citations
18 Claims
-
1. In a development system for creating a software program by a process which includes compiling a hierarchy of interdependent source code modules, wherein some of the source code modules are dependent on imports comprising symbol information imported from others of the source code modules, a method for recompiling only those particular source code modules which require recompilation when a modification occurs to any one of said source code modules, the method comprising:
-
(a) beginning with a source code module which serves as a root source code module of said hierarchy of interdependent source code modules, determining whether a particular source code module under examination has itself been modified; (b) if the particular source code module has itself been modified, recompiling the particular source code module, including invoking the method for each source code module which provides imports to the particular source code module, for determining which source code modules providing imports require recompilation, and thereafter terminating execution of the method; and (c) if the particular source code module has not itself been modified, examining each import of the particular source code module by performing substeps of; (i) if none of the imports have themselves been modified since last compiling the particular source code module, terminating execution of the method, (ii) if some of the imports have themselves been modified since last compiling the particular source code module, invoking the method for each source code module which provides imports to the particular source code module, for determining which source code modules providing imports require recompilation, (iii) if any of the imports have been recompiled and if the particular source code module extends from imports which have changed symbol information and which have been recompiled, recompiling the particular source code module and thereafter terminating execution of the method, and (iv) if any of the imports have been recompiled and if the particular source code module does not extend from imports which have changed symbol information and which have been recompiled, performing substeps of; determining whether any of the imports include a symbol which has changed and which is used by the particular source code module, and recompiling the particular source code module if any import includes a symbol which has changed and which is used by the particular source code module, and thereafter terminating execution of the method. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
-
Specification