Abstract
Polyvariant expansion is a program transformation which improves the results of offline partial evaluation. We show how to achieve it automatically for a higher-order functional language using the interpretive approach. We have designed and implemented an interpreter that statically propagates binding times. When specialized with respect to a source program, it performs polyvariant expansion. Generalizing the interpreter to an online specializer allows us to generate a binding-time-polyvariant compiler generator.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
A. Bondorf. Automatic autoprojection of higher order recursive equations. Science of Computer Programming, 17:3–34, 1991.
A. Bondorf and J. Jørgensen. Efficient analyses for realistic off-line partial evaluation. Journal of Functional Programming, 3(3):315–346, July 1993.
M. A. Bulyonkov. Polyvariant mixed computation for analyzer programs. Acta Inf., 21:473–484, 1984.
M. A. Bulyonkov. Extracting polyvariant binding times from polyvariant specializer. In PEPM1993 [26], pages 59–65.
C. Consel. Binding time analysis for higher order untyped functional languages. In Symp. Lisp and Functional Programming '92, pages 264–272, San Francisco, Ca., June 1992. ACM.
C. Consel. Polyvariant binding-time analysis for applicative lanuages. In PEPM1993 [26], pages 66–77.
C. Consel. A tour of Schism. In PEPM1993 [26], pages 134–154.
C. Consel and O. Danvy. Tutorial notes on partial evaluation. In Symposium on Principles of Programming Languages '93, pages 493–501, Charleston, Jan. 1993. ACM.
P. Cousot and R. Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Proc. 4th Symposium on Principles of Programming Languages. ACM, 1977.
P. Cousot and R. Cousot. Comparing the galois connection and widening/narrowing approaches to abstract interpretation. In M. Bruynooghe and M. Wirsing, editors, Proc. Programming Language Implementation and Logic Programming '92, pages 269–295, Leuven, Belgium, Aug. 1992. Springer-Verlag. LNCS 631.
P. Cousot and R. Cousot. Formal language, grammar and set-constraint-based program analysis by abstract interpretation. In S. Peyton Jones, editor, Proc. Functional Programming Languages and Computer Architecture 1995, pages 170–181, La Jolla, CA, June 1995. ACM Press, New York.
A. Ershov. Mixed computation: Potential applications and problems for study. In Mathematical Logic Methods in AI Problems and Systematic Programming, Part 1, pages 26–55. Vil'nyus, USSR, 1980. (In Russian).
A. Ershov. Mixed computation: Potential applications and problems for study. Theoretical Computer Science, 18:41–67, 1982.
Y. Futamura. Partial evaluation of computation process—an approach to a compiler-compiler. Systems, Computers, Controls, 2(5):45–50, 1971.
M. Gengler and B. Rytz. A polyvariant binding time analysis handling partially known values. In Workshop on Static Analysis, volume 81–82 of Bigre Journal, pages 322–330, Rennes, France, 1992. IRISA.
R. Glück. On the generation of specializers. Journal of Functional Programming, 4(4):499–514, Oct. 1994.
R. Glück and J. Jørgensen. Generating optimizing specializers. In IEEE International Conference on Computer Languages, pages 183–194. IEEE Computer Society Press, 1994.
C. K. Gomard. Partial type inference for untyped functional programs. In Proceedings of the Conference on Lisp and Functional Programming, pages 282–287, Nice, France, 1990. ACM.
C. K. Gomard and N. D. Jones. A partial evaluator for the untyped lambdacalculus. Journal of Functional Programming, 1(1):21–69, January 1991.
F. Henglein. Efficient type inference for higher-order binding-time analysis. In Conf. Functional Programming Languages and Computer Architecture '91, pages 448–472, Cambridge, Sept. 1991. ACM.
IEEE. Standard for the Scheme programming language. Technical Report 1178-1990, Institute of Electrical and Electronic Engineers, Inc., New York, 1991.
N. D. Jones. Flow Analysis of Lazy Higher-Order Functional Programs, pages 103–122. Ellis Horwood, 1987.
N. D. Jones, C. K. Gomard, and P. Sestoft. Partial Evaluation and Automatic Program Generation. Prentice-Hall, 1993.
T. Æ. Mogensen. Binding time analysis for polymorphically typed higher order languages. In J. Díaz and F. Orejas, editors, TAPSOFT '89, pages II, 298–312, Barcelona, Spain, Mar. 1989. Springer-Verlag. LNCS 351,352.
T. Æ. Mogensen. Separating binding times in language specifications. In Proc. Functional Programming Languages and Computer Architecture 1989, pages 14–25, London, GB, 1989.
Proc. 1993 ACM Symp. Partial Evaluation and Semantics-Based Program Manipulation, Copenhagen, Denmark, June 1993. ACM.
B. Rytz and M. Gengler. A polyvariant binding time analysis. In C. Consel, editor, Workshop Partial Evaluation and Semantics-Based Program Manipulation '92, pages 21–28, San Francisco, CA, June 1992. Yale University. Report YALEU/DCS/RR-909.
M. Sperber, R. Glück, and P. Thiemann. Bootstrapping higher-order program transformers from interpreters. In 1996 ACM Symposium on Applied Computing Programming Languages Track, pages 408–413, Philadelphia, 1996.
M. H. Sørensen. A grammar-based data-flow analysis to stop deforestation. In Trees in Algebra and Programming, volume 787 of Lecture Notes in Computer Science, Edinburgh, Apr. 1994.
V. Turchin. A supercompiler system based on the language Refal. SIGPLAN Notices, 14(2):46–54, February 1979.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Thiemann, P., Sperber, M. (1996). Polyvariant expansion and compiler generators. In: Bjørner, D., Broy, M., Pottosin, I.V. (eds) Perspectives of System Informatics. PSI 1996. Lecture Notes in Computer Science, vol 1181. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-62064-8_24
Download citation
DOI: https://doi.org/10.1007/3-540-62064-8_24
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-62064-8
Online ISBN: 978-3-540-49637-3
eBook Packages: Springer Book Archive