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. © Springer-Verlag Berlin Heidelberg 2001.
W. T. 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. H. M. funded by the University of Copenhagen.