Polymorphic time systems for estimating program complexity

  • Authors:
  • Vincent Dornic;Pierre Jouvelot;David K. Gifford

  • Affiliations:
  • CRI, Ecole des Mines de Paris and DRPA, Bull Louveciennes;CRI, Ecole des Mines de Paris and MIT;MIT

  • Venue:
  • ACM Letters on Programming Languages and Systems (LOPLAS)
  • Year:
  • 1992

Quantified Score

Hi-index 0.00

Visualization

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.