Abstract
There is a main difference between a program which is interpreted by an interpreter written in a strongly-typed language and a compiled version. Such an interpreter usually uses a universal domain for the values it manipulates. A value encoding is necessary. A compiled program works directly on values. A layer of interpretation for value representation is inserted. On the other hand, a way to derive automatically a compiler from an interpreter is to use a partial evaluator applied to the interpreter and the interpreted program. This leads to a problem when we want that this technique removes all the layer of interpretation because value encoding must disappear. It is not the case for conventional partial evaluator. This paper proposes to introduce a new domain for partial evaluators called alternative values and a new algorithm of specialization (based on events) which can solve this problem of removing value encoding. We conclude by reporting a successful specialization of an interpreter written in a strongly-typed language by the partial evaluator LaMix which is based on those ideas.
Chapter PDF
Similar content being viewed by others
References
D. Bechet. Les valeurs alternatives et la notion d'événement dans l'évaluation partielle. PhD thesis, Université de Paris VII, Paris, France, October 1995.
C. Consel and O. Danvy. Tutorial notes on partial evaluation. In Twentieth ACM Symposium on Principles of Programming Languages, Charleston, South Carolina, January 1993, pages 493–501. ACM, New York: ACM, 1993.
D. Dussart, E. Bevers, and K. de Vlaminck. Polyvariant constructor specialisation. In Partial Evaluation and Semantics-Based Program Manipulation, La Jolla, California, June 1995, pages 54–65. ACM SIGPLAN, 1995.
Y. Futamura. Partial evaluation of computation process — an approach to a compiler-compiler. Systems, Computers, Controls, 2(5):45–50, 1971.
A. Haraldsson. A Program Manipulation System Based on Partial Evaluation. PhD thesis, Linköping University, Sweden, 1977. Linköping Studies in Science and Technology Dissertations 14.
N.D. Jones, C.K. Gomard, and P. Sestoft. Partial Evaluation and Automatic Program Generation. Englewood Cliffs, NJ: Prentice Hall, 1993.
J. Launchbury. Projection Factorisations in Partial Evaluation. Cambridge: Cambridge University Press, 1991.
J. Launchbury. A strongly-typed self-applicable partial evaluator. In J. Hughes, editor, Functional Programming Languages and Computer Architecture, Cambridge, Massachusetts, August 1991 (Lecture Notes in Computer Science, vol. 523), pages 145–164. ACM, Berlin: Springer-Verlag, 1991.
T. Mogensen. Partially static structures in a self-applicable partial evaluator. In D. Bjørner, A.P. Ershov, and N.D. Jones, editors, Partial Evaluation and Mixed Computation, pages 325–347. Amsterdam: North-Holland, 1988.
T. Mogensen. Constructor specialization. In Partial Evaluation and Semantics-Based Program Manipulation, Copenhagen, Denmark, June 1993, pages 22–32. New York: ACM, 1993.
A. Salomaa. Formal languages. Computer Science Classics. Academic Press, Inc., 1987.
V.F. Turchin. A supercompiler system based on the language Refal. SIGPLAN Notices, 14(2):46–54, February 1979.
Pierre Weis and Xavier Leroy. Le Langage CAML. InterEditions, 1993.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bechet, D. (1996). Removing value encoding using alternative values in partial evaluation of strongly-typed languages. In: Nielson, H.R. (eds) Programming Languages and Systems — ESOP '96. ESOP 1996. Lecture Notes in Computer Science, vol 1058. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61055-3_30
Download citation
DOI: https://doi.org/10.1007/3-540-61055-3_30
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-61055-7
Online ISBN: 978-3-540-49942-8
eBook Packages: Springer Book Archive