Abstract
Tag elimination is a program transformation for removing unnecessary tagging and untagging operations from automatically generated programs. Tag elimination was recently proposed as having immediate applications in implementations of domain specific languages (where it can give a two-fold speedup), and may provide a solution to the long standing problem of Jones-optimal specialization in the typed setting. This paper explains in more detail the role of tag elimination in the implementation of domain-specific languages, presents a number of significant simplifications and a high-level, higher-order, typed self-applicable interpreter. We show how tag elimination achieves Jones-optimality.
Article
Funded by a Postdoctoral Fellowship from the Swedish Research Council for Engineering Sciences (TFR), grant number 221-96-403, and by subcontract #8911-48186 from Johns Hopkins University under NSF agreement Grant # EIA-9996430.
Article
Funded by the University of Copenhagen.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Olivier Danvy. A simple solution to type specialization. In 25th International Colloquium on Automata, Languages, and Programming, volume 1443 of Lecture Notes in Computer Science, Aalborg, 1998.
Fritz Henglein and Jakob Rehof. Safe polymorphic type inference for a dynamically typed language: Translating Scheme to ML. In Proceedings of the International Conference on Functional Programming Languages and Computer Architecture (FPCA), La Jolla, 1995. ACM Press.
John Hughes. Type specialization. ACM Computing Surveys, 30(3es), 1998.
John Hughes. The correctness of type specialisation. In European Symposium on Programming (ESOP), 2000.
Neil D. Jones. Challenging problems in partial evaluation and mixed computation. In D. Bjørner, A. P. Ershov, and N. D. Jones, editors, Partial Evaluation and Mixed Computation, pages 1–14, North-Holland, 1988. IFIP World Congress Proceedings, Elsevier Science Publishers B.V.
Neil D. Jones, Carsten K Gomard, and Peter Sestoft. Partial Evaluation and Automatic Program Generation. Prentice-Hall, 1993.
Henning Makholm. On Jones-optimal specialization for strongly typed languages. In [13], pages 129–148, 2000.
John C. Mitchell. On abstraction and the expressive power of programming languages. In T. Ito and A. R. Meyer, editors, Theoretical Aspects of Computer Software, volume 526 of Lecture Notes in Computer Science, pages 290–310. Springer-Verlag, 1991.
Torben Mogensen. Inherited limits. In Partial Evaluation: Practice and Theory, volume 1706 of Lecture Notes in Computer Science, pages 189–202. Springer-Verlag, 1999.
Eugenio Moggi, Walid Taha, Zine El-Abidine Benaissa, and Tim Sheard. An idealized MetaML: Simpler, and more expressive. In European Symposium on Programming (ESOP), volume 1576 of Lecture Notes in Computer Science, pages 193–207. Springer-Verlag, 1999.
Frank Pfenning and Peter Lee. LEAP: A language with eval and polymorphism. In Josep DĂaz and Fernando Orejas, editors, TAPSOFT’89: Proceedings of the International Joint Conference on Theory and Practice of Software Development,, volume 352 of Lecture Notes in Computer Science, pages 345–359. Springer-Verlag, 1989.
Brian Cantwell Smith. Reflection and Semantics in a Procedural Language. PhD thesis, Massachusetts Institute of Technology, 1982.
Walid Taha, editor. Semantics, Applications, and Implementation of Program Generation, volume 1924 of Lecture Notes in Computer Science, Montréal, 2000. Springer-Verlag.
Walid Taha. A sound reduction semantics for untyped CBN multi-stage computation. Or, the theory of MetaML is non-trivial. In Proceedings of the Workshop on Partial Evaluation and Semantics-Based Program Maniplation (PEPM), Boston, 2000. ACM Press.
Walid Taha and Henning Makholm. Tag elimination — or — type specialisation is a type-indexed effect. In Subtyping and Dependent Types in Programming, APPSEM Workshop. INRIA technical report, 2000.
Walid Taha and Tim Sheard. Multi-stage programming with explicit annotations. In Proceedings of the Symposium on Partial Evaluation and Semantic-Based Program Manipulation (PEPM), pages 203–217, Amsterdam, 1997. ACM Press.
Mitchell Wand. The theory of fexprs is trivial. Lisp and Symbolic Computation, 10:189–199, 1998.
Andrew K. Wright and Matthias Felleisen. A syntactic approach to type soundness. Information and Computation, 115(1):38–94, 1994.
Zhe Yang. Encoding types in ML-like languages. In Proceedings of the International Conference on Functional Programming (ICFP), pages 289–300, Baltimore, 1998. ACM Press.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Taha, W., Makholm, H., Hughes, J. (2001). Tag Elimination and Jones-Optimality. In: Danvy, O., Filinski, A. (eds) Programs as Data Objects. PADO 2001. Lecture Notes in Computer Science, vol 2053. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44978-7_15
Download citation
DOI: https://doi.org/10.1007/3-540-44978-7_15
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-42068-2
Online ISBN: 978-3-540-44978-2
eBook Packages: Springer Book Archive