next up previous contents
Next: Probability Distributions Up: ProGenitor Previous: ProGenitor

 

5.1 Input Parameters

Each of the following parameters is specified separately for user and library routines. Several of the parameters for the library routines are not relevant to our continuous compilation model, but they are still specified separately.

Number of source/header files
The number of source files and the number of headers files are specified separately for both user and library routines. gif For library routines these values are not too important, but for user routines they can have a significant effect since the time required for compilation is directly related to the number of files needing translation. However, the influence of this parameter is overshadowed by the effect of the next parameter: the number of functions per source file.

Number of functions per source file
Since the Compiler module of the continuous compiler operates on the granularity level of the file (i.e., it translates an entire file at a time, and the native-code version of the routines contained in the file is not available until the entire file is translated), the number of user routines per source file could profoundly affect performance. In addition, the total number of routines is not specified. Instead, the number of functions per source file is multiplied by the number of source files to determine the total number of functions. Again, the values for user and library files are given separately.

``Popularity'' of each header file
This parameter is used to indicate how many source files, on average, include a given header file.

Number of lines per source file
This parameter is used to determine the time required to translate a given file to native code. Other parameters (described below) give the coefficients of the equation used to calculate the translation time based on the number of lines in the source file. Again, although the value of this parameter for library files has no affect on our continuous compilation simulation, it is specified separately for user and library files for the sake of generality and possible future applications.

Coefficients of the translation-time equation
The equation used to calculate the translation time for a file is a standard quadratic equation

displaymath1416

where x is the number of lines in the file. The coefficients of this equation are given as parameters to ProGenitor.

Execution time between calls
This parameter gives the time, in milliseconds, that a given function executes between making calls to other functions. Combined with the number of call sites per function, this parameter also specifies the total execution time of the function. Like all of the parameters, this one is specified separately for user and library functions. However, unlike the above parameters, the value of this parameter for library functions is as important as its value for user functions.

Number of call sites per function
This parameter specifies the number of function calls made by a given function. It can arguably be said to have the most direct influence on the call structure of the generated program.

Maximum recursion depth
When the ProGenitor program was first developed, this parameter was not included. However, due to the nondeterministic way in which the call structure of the generated program is built, mutually recursive function calls were sometimes generated, causing the program to get stuck in an endless chain of calls. This parameter was added to alleviate that problem.

Chance of calling a user function
This parameter specifies the chance of a given call site being to a user function as opposed to a library function. This parameter has the most direct influence on relationship between user and library routines. The value of this parameter for user functions indicates the percentage of time that a user function calls other user functions rather than library functions. Using a nonzero value of this parameter for library functions allows us to model callbacks, where a library routine makes a call to a user function.

Chance of a call site being fixed
A value of less than 1 for this parameter allows us to simulate variable functions calls, emulating the use of function pointers in real programs.

Chance of just returning
This parameter specifies the chance of a function returning immediately when called.

The cutoff time for the program execution trace is also specified as a parameter to ProGenitor. If the generated program does not finish execution within the specified time, the trace is cut off to simulate the program being interrupted by the user.

Two other parameters, not directly related to the generated program, are required by the ProGenitor program. The first is the seed for the random number generator. Providing this as input allows us to duplicate previous executions exactly, or vary the execution nondeterministically, as needed.

The second parameter is a flag indicating if information about the library routines and files should be included in the output setup file. Our continuous compilation simulator treats any routine that is referenced in the behavior trace, but not in the setup file, as a library routine. Therefore, when generating programs to be used with our simulator, it is necessary that the library routines not be included in the setup file. However, the ability to include that information, perhaps for use with future applications, was retained.


next up previous contents
Next: Probability Distributions Up: ProGenitor Previous: ProGenitor