In developing a complex computer program, it is efficient to create the program by integrating several smaller pads rather than writing a single large program. The source code pads used in building the program can be created and maintained individually in a program library and accessed as desired. In building the complex program, each of its component source code pads is accessed and scheduled for compilation prior to integration into an executable program. For successful construction of the complex program, the several component source code pads required must be scheduled for compilation in the correct sequence. Logically independent source code pads must be scheduled for compilation before their dependent source code pads can be compiled.
Scheduling the compilation of source code pads without dependencies is relatively simple. However, the scheduling becomes complex when compilation dependencies and prerequisites between source code pads arise as the compilation proceeds. This may happen because in the source code pads library, pads are maintained independently of each other on an ongoing basis. This may result in a modification to one source code pad introducing dependencies on other source code pads which are unknown to the scheduler until the scheduler attempts to compile the pad. In this event, if the scheduler cannot dynamically adapt to the new dependencies, the construction of the program will be stopped until the dependency problem is resolved.
Other problems may be encountered when scheduling the compilation of source code pads. The pads may have circular, prerequisite compilation dependencies or have prerequisites on non-existing source code pads. A circular prerequisite compilation dependency occurs where, for example, pad. A cannot be compiled until after the compilation of pad B, and pad B cannot be compiled until after the compilation of pad A. When such circular compilation dependency occurs, an infinite scheduling loop will develop without the computer program being built.
Consequently, in order to efficiently construct a computer program from source code parts, the pads must be scheduled correctly, the compilation dependencies which arise between pads during compilation must be dynamically adapted by the scheduler into the schedule, and, when source code pads become involved in circular scheduling loops the construction of the application must be stopped in a timely manner.
In the prior ad, one way of integrating source code parts in building a computer program is to use a MAKE facility. With a MAKE facility, make files are created by specifying in a file the source code parts that are needed in the build, and the order in which the source code parts should be made. With this approach to building a complex program the user must continually intervene in the process to keep the make files up-to-date and syntactically correct. This task is difficult when many source code parts are being modified, added to or deleted from a large source code parts library.
An alternative prior ad approach is to use a source code parts scheduler which is capable of parsing the source code of each source code part prior to scheduling its compilation. This enables source code parts dependencies to be determined and thereby enable the scheduling of the compilation of the parts. A scheduler of this type requires a parser which is identical to the parser in each compiler that it supports. While this approach may be adequate where the scheduler supports source code parts coded in the same source language, it is inefficient where parts are written in several languages and are in the same parts library. Also, even if a parser was provided in a scheduler, by the time the actual compile is performed based on information learned from parsing the code, a compilation dependency may change due to source code parts maintenance, and therefore the information obtained for the schedule can become out of date.
Consequently the above two approaches are unsatisfactory. Additionally, neither approach is capable of dynamically adapting the schedule to dependencies between source code parts that become known as the parts are compiled.
U.S. Pat. No. 4,852,001 assigned to Hitachi, Ltd. discloses a job scheduling method for scheduling of jobs to various resources, wherein each workload of a job is allocated to each time unit along a time axis in units of job and resource type. The patent relates to timing of jobs and allocation of time and does not address the building of application programs and scheduling of dependencies.
U.S. Pat. No. 4,791,554 assigned to Hitachi, Ltd. discloses a computer system for parallel execution of several tasks by sharing several resources in a database of a computer. The patent discusses "deadlock" due to the sharing of common resources and provides information to delay the start of a task that has the possibility of the deadlock. This patent also is not concerned with the problem addressed by the present invention.
U.S. Pat. No. 4,658,351 assigned to Wang Laboratories, Inc. discloses a task control method and apparatus for controlling interactive, concurrent execution of several general purpose data processing tasks in a data processing system. The task manager includes several task queues with each queue corresponding to a relative priority level for execution of the task. Tasks are executed in a sequence depending upon the relative priorities of the task queues and upon the sequential location of task control blocks in a task queue. This patent also does not address the problem which this present invention solves.
The problem of scheduling the building of a computer program by scheduling the compilation of several interdependent source code parts from a library of parts, wherein a part may have several compilation dependencies unknown to the scheduler at the beginning of the build, has not been adequately addressed in the prior art. Also, no known means presently is available for dynamically adapting to new compilation source code part dependencies which become known as the compilation proceeds. Also, no known means is available for efficiently recognizing the existence of circular compilation dependencies among source code parts that may frustrate attempts to build the application.