Computing Types During Program Specialization

We have developed techniques for obtaining and using type information during program specialization (partial evaluation). Computed along with every residual expression and every specialized program is type information that bounds the possible values that the specialized program will compute at run time. The three keystones of this research are symbolic values that represent both a value and the code for creating the value, generalization of symbolic values, and the use of online fixed-point iterations for computing the type of values returned by specialized recursive functions. The specializer exploits type information to increase the efficiency of specialized functions. This research has two benefits, one anticipated and one unanticipated. The anticipated benefit is that programs that are to be specialized can now be written in a more natural style without losing accuracy during specialization. The unanticipated benefit is the creation of what we term concrete abstract interpretation. This is a method of performing abstract interpretation with concrete values where possible. The specializer abstracts values as needed, instead of requiring that all values be abstracted prior to abstract interpretation.

[1]  Erik Sandewall,et al.  A Partial Evaluator, and its Use as a Programming Tool , 1976, Artif. Intell..

[2]  Kenneth M. Kahn,et al.  A Partial Evaluator of Lisp Programs Written in Prolog , 1982, ICLP.

[3]  R. Schooler,et al.  PARTIAL EVALUATION AS A MEANS OF LANGUAGE EXTENSIBILITY , 1984 .

[4]  Gerald J. Sussman,et al.  Structure and interpretation of computer programs , 1985, Proceedings of the IEEE.

[5]  Peter Sestoft,et al.  An experiment in partial evaluation: the generation of a compiler generator , 1985, SIGP.

[6]  William L. Scherlis,et al.  Compilers and staging transformations , 1986, POPL '86.

[7]  Valentin F. Turchin,et al.  The concept of a supercompiler , 1986, TOPL.

[8]  Peter Sestoft,et al.  Automatic call unfolding in a partial evaluator , 1987 .

[9]  Philip Wadler,et al.  Projections for strictness analysis , 1987, FPCA.

[10]  Chris Hankin,et al.  Abstract Interpretation of Declarative Languages , 1987 .

[11]  Dines Bjørner,et al.  Partial Evaluation and Mixed Computation , 1987 .

[12]  Neil D. Jones,et al.  Mix: A self-applicable partial evaluator for experiments in compiler generation , 1989, LISP Symb. Comput..

[13]  Olivier Danvy,et al.  Partial Evaluation of Pattern Matching in Strings , 1989, Inf. Process. Lett..

[14]  Andrew A. Berlin,et al.  Partial evaluation applied to numerical computation , 1990, LISP and Functional Programming.

[15]  Daniel W. Weise Graphs as an Intermediate Representation for Partial Evaluation , 1990 .

[16]  Charles Consel,et al.  Binding time analysis for high order untyped functional languages , 1990, LISP and Functional Programming.