Abstract:
Abstract. In partial evaluation, a polyvariant function is specialized to dierent specialized versions, depending on the calling context. Usually, polyvariance is limited to named, top-level functions. We lift this restriction in a partial evaluator for a higher-order functional languages to obtain rst-class polyvariant functions. These functions are partially static and specialize to a memoization table. Arity raising splits a partially static parameter of a function into its dynamic components. Co-arity raising is the dual to arity raising. It splits a partially static result of a function into its dynamic components. A specializer that performs co-arity raising can transform a function returning one result into a function that returns any number of results, including zero. This technique enables polyvariant functions to return partially static results. We demonstrate the use of these techniques in combination by specializing a typed interpreter for a simply-typed applied lambda calculus so that no run-time tagging operations remain in the specialized program. The main technical contributions are the specication of a generalized binding-time analysis for polyvariant functions and co-arity raising, a structural operational semantics for the corresponding specializer, and a type soundness proof of the analysis with respect to the specializer. 1
Citations
|
174
|
Type-directed partial evaluation
– Danvy
- 1996
|
|
118
|
Automatic autoprojection of recursive equations with global variables and abstract data types
– Bondorf, Danvy
- 1991
|
|
111
|
Mix: a self-applicable partial evaluator for experiments in compiler generation
– Jones, Sestoft, et al.
- 1989
|
|
58
|
A simplified account of polymorphic references
– Harper
- 1994
|
|
45
|
Accurate binding-time analysis for imperative languages: Flow, context, and return sensitivity
– Hornof, NoyĂ©
- 1997
|
|
43
|
Polyvariant mixed computation for analyzer programs
– Bulyonkov
- 1984
|
|
36
|
Subtyping with singleton types
– Aspinall
- 1994
|
|
27
|
Challenging problems in partial evaluation and mixed computation
– Jones
|
|
25
|
Arity raiser and its use in program specialization
– Romanenko
- 1990
|
|
19
|
A simple solution to type specialization
– Danvy
- 1998
|
|
18
|
union and intersection types for program extraction
– Singleton
- 1991
|
|
18
|
Partial evaluation for higher-order languages with state. Available online from http://www.informatik.uni-freiburg.de/~thiemann/papers/ index.html
– Thiemann, Dussart
- 1996
|
|
17
|
On Jones-optimal specialization for strongly typed languages
– Makholm
- 2000
|
|
15
|
Type specialisation for the *-calculus; or, a new paradigm for partial evaluation based on type inference
– Hughes
|
|
12
|
Polymorphic recursion and subtype quali Polymorphic binding-time analysis in polynomial time
– Dussart, Henglein, et al.
- 1995
|
|
9
|
A syntactic approach to type soundness. Information and Computation
– Wright, Felleisen
- 1994
|
|
6
|
De Vlaminck. Polyvariant constructor specialization
– Dussart, Bevers, et al.
- 1995
|
|
6
|
Enforcing safety properties using type specialization
– Thiemann
- 2001
|
|
5
|
The PGG System|User Manual. Universitat
– Thiemann
- 2000
|
|
4
|
A type specialisation tutorial
– Hughes
- 1998
|
|
2
|
editors. Partial Evaluation—Practice and Theory
– Hatcliff, Mogensen, et al.
- 1999
|
|
2
|
Partially static structures in a self-applicable partial evaluator
– Torben
- 1988
|
|
2
|
Constructor specialization
– Torben
- 1993
|
|
2
|
Tag elimination or type specialization is a type-indexed eect
– Taha
- 2000
|
|
1
|
Inherited limits
– Torben
|
|
1
|
Interpreting specialization in type theory
– Thiemann
- 1999
|