|
ABSTRACT
We present a new approach to static program analysis that permits each expression in a program to be assigned an execution time estimate. Our approach uses a time system in conjunction with a conventional type system to compute both the type and the time of an expression. The time of an expression is either an integer upper bound on the number of ticks the expression will execute, or the distinguished element long that indicates that the expression contains a loop, and thus may run for an arbitrary length of time. Every function type includes a latent time that is used to communicate its expected execution time from the point of its definition to the points of its use. Unlike previous approaches, a time system works in the presence of first-class functions and separate compilation. In addition, time polymorphism allows the time of a function to depend on the times of any functions that it takes as arguments. Time estimates are useful when compiling programs for multiprocessors in order to balance the overhead of initiating a concurrent computation against the expected execution time of the computation. The correctness of our time system is proven with respect to a dynamic semantics.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
 |
1
|
|
 |
2
|
|
| |
3
|
DORNIC, V. Analyse de complexit~ des algorithmes: v~rification et inference. Ph.D. thesis, Ecole des Mines de Paris (in preparation). Expected 1992.
|
| |
4
|
FLAJOLET, P. AND VITTER, Jo S. Average-case analysis of algorithms and data structures. Research report INRIA 718, Aug. 1987.
|
| |
5
|
GIFFORD, D. K., JOUVELOT, P., LUCASSEN, J. M., AND SHELDON, M.A. The FX-87 reference manual. Res. Rep. MIT/LCS/TR-407, 1987.
|
| |
6
|
GOLDBERG, F. S. Multiprocessor execution of functional programs. Res. Rep., Yale, DCS/RR-618, Apr. 1988.
|
| |
7
|
GRAY, S.L. Using futures to exploit parallelism in Lisp. MIT SB Masters thesis, 1983.
|
 |
8
|
|
| |
9
|
JOUVELOT, P. AND GIFFORD, D. K. The FX-87 interpreter. In Proceedings of the IEEE International Conference on Computer Languages (Miami Beach, Fla., Oct. 1988), pp. 65-72.
|
 |
10
|
|
| |
11
|
KOZEN, D. Semantics of probabilistic programs. J. Comput. Syst. Sci. 22 (1981), 328-350.
|
 |
12
|
|
| |
13
|
LUCASSEN, J.M. Types and effects, towards the integration of functional and imperative programming. Ph.D. dissertation, MIT-LCS, Sept. 1987.
|
 |
14
|
|
| |
15
|
RAMSHAW, L. H. Formalizing the analysis of algorithms. Rep. SL-79-5, Xerox Palo Alto Research Center, Palo Alto, Calif., 1979.
|
 |
16
|
|
| |
17
|
SANDS, D. Complexity analysis for higher order languages. Res. Rep. DOC 88/14, imperial College, London, Oct. 1988.
|
| |
18
|
|
| |
19
|
TOFTE, M. Operational semantics and polymorphic type inference. Thesis, CST-52-88, Univ. of Edinburgh, 1988.
|
| |
20
|
TURING, A.M. On computable numbers, with an application to the Entscheidungsproblem. In Proceedings of the London Mathematical Society 42, 2 (1936), 230-265 and 43, (1936), 544-546.
|
 |
21
|
|
 |
22
|
|
|