Hostname: page-component-586b7cd67f-2plfb Total loading time: 0 Render date: 2024-11-22T00:19:33.588Z Has data issue: false hasContentIssue false

On the specialization of online program specializers1

Published online by Cambridge University Press:  07 November 2008

Erik Ruf
Affiliation:
Stanford University
Daniel Weise
Affiliation:
Microsoft Research Laboratory
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

A common technique for improving the speed of program specialization is to specialize the program specializer itself on the program to be specialized, creating a custom program generator. Much research has been devoted to the problem of generating efficient program generators, which do not perform reductions at program generation time which could instead have been performed when the program generator was constructed. The conventional wisdom holds that only program specializers using binding-time approximations can be specialized into such efficient program generators. This paper argues that this is not the case, and demonstrates that the specialization of a nontrivial online program specializer similar to the original ‘naive MIX’ can indeed yield an efficient program generator. The key to our argument is that, while the use of binding-time information at program generator generation time is necessary for the construction of an efficient custom specializer, the use of explicit binding-time approximation techniques is not. This allows us to distinguish the problem at hand (i.e. the use of binding-time information during program generator generation) from particular solutions to that problem (i.e. offline specialization). We show that, given a careful choice of specializer data structures, and sufficiently powerful specialization techniques, binding-time information can be inferred and utilized without explicit approximations. This allows the construction of efficient, optimizing program generators from online program specializers.

Type
Articles
Copyright
Copyright © Cambridge University Press 1993

References

Aiken, A., & Murphy, B. R. (1991) Static Type Inference in a Dynamically Typed Language. Pages 279290of: Eighteenth Annual ACM Symposium on Principles of Programming Languages.CrossRefGoogle Scholar
Beckman, L., et al. . (1976) A partial evaluator and its use as a programming tool. Artificial Intelligence, 7(4), 291357.CrossRefGoogle Scholar
Bondorf, A. (1990) Self-Applicable Partial Evaluation. Ph.D. thesis, DIKU, University of Copenhagen, Denmark. Revised version: DIKU Report 90/17.Google Scholar
Bondorf, A., Jones, N., Mogensen, T., & Sestoft, P. (1988) Binding Time Analysis and the Taming of Self-Application. Draft, 18 pages. DIKU, University of Copenhagen, Denmark.Google Scholar
Consel, C. (1989) Analyse de programmes, Evaluation partielle et Génération de compilateurs. Ph.D. thesis, Université de Paris 6, Paris, France. 109 pages. (In French).Google Scholar
Consel, C., & Danvy, O. (1990) From Interpreting to Compiling Binding Times. Pages 88105of: Jones, N. (ed), Proceedings of the 3rd European Symposium on Programming.Springer-Verlag, LNCS 432.CrossRefGoogle Scholar
Ershov, A. P. (1977) On the Partial Computation Principle. Information Processing Letters, 6(2), 3841.CrossRefGoogle Scholar
Ershov, A. (1978) On the Essence of Compilation. Pages 391420of: Neuhold, E. (ed), Formal Description of Programming Concepts. North-Holland.Google Scholar
Ershov, A., Bjørner, D., Futamura, Y., Furukawa, K., Haraldson, A., & Scherlis, W. (eds). (1988) Special Issue: Selected Papers from the Workshop on Partial Evaluation and Mixed Computation, 1987 (New Generation Computing, vol. 6, nos. 2,3). OHMSHA Ltd. and Springer-Verlag.Google Scholar
Futamura, Y. (1971) Partial evaluation of computation process—an approach to a compiler-compiler. Systems, Computers, Controls, 2(5), 4550.Google Scholar
Glück, R. (1991) Towards Multiple Self-Application. Pages 309320of: Partial Evaluation and Semantics-Based Program Manipulation, New Haven, Connecticut. (SIGPLAN Notices, vol. 26, no. 9, September 1991). ACM.Google Scholar
Glück, R., & Turchin, V. F. (1989) Experiments with a self-applicable supercompiler. Tech. rept. City University of New York.Google Scholar
Gomard, C., & Jones, N. (1991) A Partial Evaluator for the Untyped Lambda-Calculus. Journal of Functional Programming, 1(1), 2169.CrossRefGoogle Scholar
Haraldsson, A. (1977) A Program Manipulation System Based on Partial Evaluation. Ph.D. thesis, Linköping University. Published as Linköping Studies in Science and Technology Dissertation No. 14.Google Scholar
Henglein, F. (1992) Global Tagging Optimization by Type Inference. Pages 205215of: Proceedings of the 1992 ACM Conference on Lisp and Functional Programming(LISP Pointers vol. 5, no. 1, January-March 1992).CrossRefGoogle Scholar
Holst, C. K. (1991) Finiteness Analysis. Pages 473495of: Functional Programming Languages and Computer Architecture, Cambridge, Massachusetts, August 1991 (LNCS 523) Springer-Verlag, for ACM.CrossRefGoogle Scholar
Holst, C. K., & Launchbury, J. (1991) Handwriting Cogen to Avoid Problems with Static Typing. Pages 210218of: Draft Proceedings, Fourth Annual Glasgow Workshop on Functional Programming, Skye, Scotland. Glasgow University.Google Scholar
Jones, N. D., Sestoft, P., & Søndergaard, H. (1985) An experiment in partial evaluation: The generation of a compiler generator. Pages 124140of: Rewriting Techniques and Applications. Springer-Verlag, LNCS 202.CrossRefGoogle Scholar
Jones, N. D., Sestoft, P., & Søndergaard, H. (1988) Mix: A self-applicable partial evaluator for experiments in compiler generation. Lisp and Symbolic Computation, 1(3/4), 950.Google Scholar
Jones, N. D., Gomard, C., & Sestoft, P. (1993) Partial Evaluation and Automatic Program Generation. (in progress).Google Scholar
Kahn, K. M. (1982) A partial evaluator of Lisp programs written in Prolog. Pages 1925of: Caneghem, M. V. (ed), First International Logic Programming Conference.Google Scholar
Katz, M., & Weise, D. (1992) Towards a New Perspective on Partial Evaluation. Pages 29–37 of: ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Directed Program Manipulation. Proceedings available as YALEU/DCS/RR-909.Google Scholar
Lakhotia, A., & Sterling, L. (1991) ProMiX: A Prolog Partial Evaluation System. Chap. 5, pages 137179of: Sterling, L. (ed), The Practice of Prolog. MIT Press.Google Scholar
Launchbury, J. (1991) Self-Applicable Partial Evaluation without S-Expressions. Pages 145164of: Functional Programming Languages and Computer Architecture, Cambridge, Massachusetts, August 1991 (LNCS 523) Springer-Verlag, for ACM.CrossRefGoogle Scholar
Mogensen, T. (1989) Binding Time Aspects of Partial Evaluation. Ph.D. thesis, DIKU, University of Copenhangen, Copenhagen, Denmark.Google Scholar
Peterson, J. (1989) Untagged data in tagged languages: choosing optimal representations at compile time. Pages 8999of: Proceedings of the 4th ACM Conference on Functional Programming Languages and Computer Architecture.CrossRefGoogle Scholar
Rees, J., Clinger, W., et al. . (1991) Revised4 Report on the Algorithmic Language Scheme. LISP Pointers, 4(3), 155.Google Scholar
Romanenko, S. (1990) Arity Raiser and Its Use in Program Specialization. Pages 341360of: Jones, N. (ed), ESOP ‘90. 3rd European Symposium on Programming,Copenhagen, Denmark,May 1990.(Lecture Notes in Computer Science, vol. 432). Springer-Verlag.CrossRefGoogle Scholar
Ruf, E. (1993) Topics in Online Partial Evaluation. Ph.D. thesis, Stanford University, Stanford, CA. Published as Stanford Technical Report CSL-TR-93-563, March 1993.Google Scholar
Ruf, E., & Weise, D. (1992a) Opportunities for Online Partial Evaluation. Tech. rept. CSL-TR-92-516. Computer Systems Laboratory, Stanford University, Stanford, CA.Google Scholar
Ruf, E., & Weise, D. (1992b) Preserving Information during Online Partial Evaluation. Tech. rept. CSL-TR-92-517. Computer Systems Laboratory, Stanford University, Stanford, CA.Google Scholar
Sahlin, D. (1991) An Automatic Partial Evaluator for Full Prolog. Ph.D. thesis, Kungliga Tekniska Högskolan, Stockholm, Sweden. Report TRITA-TCS-9101, 170 pages.Google Scholar
Schooler, R. (1984) Partial Evaluation as a means of Language Extensibility. M.S. thesis, MIT, Cambridge, MA. Published as MIT/LCS/TR-324.Google Scholar
Steele, G. L. Jr. (1978) Rabbit: A Compiler for Scheme. Tech. rept. AI-TR-474. MIT Artificial Intelligence Laboratory, Cambridge, MA.Google Scholar
Turchin, V. F. (1986) The Concept of a Supercompiler. ACM Transactions on Programming Languages and Systems, 8(3), 292325.CrossRefGoogle Scholar
Turchin, V. F. (1988) The Algorithm of Generalization in the Supercompiler. Pages 531549of: Bjørner, D., Ershov, A. P., & Jones, N. D. (eds), Partial Evaluation and Mixed Computation. North-Holland.Google Scholar
Weise, D., Conybeare, R., Ruf, E., & Seligman, S. (1991) Automatic Online Partial Evaluation. Pages 165191of: Hughes, J. (ed), Functional Programming Languages and Computer Architecture (LNCS 523). Cambridge, MA: Springer-Verlag, for ACM.CrossRefGoogle Scholar
Young, J., & O'Keefe, P. (1988) Experience with a type evaluator. Pages 573581of: Bjørner, D., Ershov, A. P., & Jones, N. D. (eds), Partial Evaluation and Mixed Computation. North-Holland.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.