Advertisement

The Translation Power of the Futamura Projections

  • Robert Glück
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2890)

Abstract

Despite practical successes with the Futamura projections, it has been an open question whether target programs produced by specializing interpreters can always be as efficient as those produced by a translator. We show that, given a Jones-optimal program specializer with static expression reduction, there exists for every translator an interpreter which, when specialized, can produce target programs that are at least as fast as those produced by the translator. This is not the case if the specializer is not Jones-optimal. We also examine Ershov’s generating extensions, give a parameterized notion of Jones optimality, and show that there is a class of specializers that can always produce residual programs that match the size and time complexity of programs generated by an arbitrary generating extension. This is the class of generation universal specializers. We study these questions on an abstract level, independently of any particular specialization method.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Abramov, S.M., Glück, R.: Combining semantics with non-standard interpreter hierarchies. In: Kapoor, S., Prasad, S. (eds.) FST TCS 2000. LNCS, vol. 1974, pp. 201–213. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  2. 2.
    Ager, M.S., Danvy, O., Rohde, H.K.: On obtaining Knuth, Morris, and Pratt’s string matcher by partial evaluation. In: Proceedings of the Asian Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 32–46. ACM Press, New York (2002)CrossRefGoogle Scholar
  3. 3.
    Danvy, O., López, P.E.M.: Tagging, encoding, and Jones optimality. In: Degano, P. (ed.) ESOP 2003. LNCS, vol. 2618, pp. 335–347. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  4. 4.
    Ershov, A.P.: On the partial computation principle. Information Processing Letters 6(2), 38–41 (1977)zbMATHCrossRefGoogle Scholar
  5. 5.
    Futamura, Y.: Partial evaluation of computing process – an approach to a compilercompiler. Systems, Computers, Controls 2(5), 45–50 (1971); Reprinted in Higher- Order and Symbolic Computation 12(4), 381–391 (1999)Google Scholar
  6. 6.
    Futamura, Y., Nogi, K.: Generalized partial computation. In: Bjørner, D., Ershov, A.P., Jones, N.D. (eds.) Partial Evaluation and Mixed Computation, pp. 133–151. North-Holland, Amsterdam (1988)Google Scholar
  7. 7.
    Glück, R.: On the generation of specializers. Journal of Functional Programming 4(4), 499–514 (1994)CrossRefGoogle Scholar
  8. 8.
    Glück, R.: Jones optimality, binding-time improvements, and the strength of program specializers. In: Proceedings of the Asian Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 9–19. ACM Press, New York (2002)CrossRefGoogle Scholar
  9. 9.
    Glück, R., Jørgensen, J.: Generating transformers for deforestation and supercompilation. In: LeCharlier, B. (ed.) SAS 1994. LNCS, vol. 864, pp. 432–448. Springer, Heidelberg (1994)Google Scholar
  10. 10.
    Glück, R., Klimov, A.V.: A regeneration scheme for generating extensions. Information Processing Letters 62(3), 127–134 (1997)CrossRefMathSciNetGoogle Scholar
  11. 11.
    Heering, J.: Partial evaluation and ω-completeness of algebraic specifications. Theoretical Computer Science 43(2-3), 149–167 (1986)zbMATHCrossRefMathSciNetGoogle Scholar
  12. 12.
    Jones, N.D.: Challenging problems in partial evaluation and mixed computation. In: Bjørner, D., Ershov, A.P., Jones, N.D. (eds.) Partial Evaluation and Mixed Computation, pp. 1–14. North-Holland, Amsterdam (1988)Google Scholar
  13. 13.
    Jones, N.D.: Partial evaluation, self-application and types. In: Paterson, M.S. (ed.) ICALP 1990. LNCS, vol. 443, pp. 639–659. Springer, Heidelberg (1990)CrossRefGoogle Scholar
  14. 14.
    Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs (1993)zbMATHGoogle Scholar
  15. 15.
    Jørgensen, J.: Generating a compiler for a lazy language by partial evaluation. In: Conference Record of the Nighteenth Symposium on Principles of Programming Languages, pp. 258–268. ACM Press, New York (1992)Google Scholar
  16. 16.
    Lavrov, S.S.: On the essence of mixed computation. In: Bjørner, D., Ershov, A.P., Jones, N.D. (eds.) Partial Evaluation and Mixed Computation, pp. 317–324. North-Holland, Amsterdam (1988)Google Scholar
  17. 17.
    Makholm, H.: On Jones-optimal specialization for strongly typed languages. In: Taha, W. (ed.) SAIG 2000. LNCS, vol. 1924, pp. 129–148. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  18. 18.
    Mogensen, T. Æ.: Partially static structures in a self-applicable partial evaluator. In: Bjørner, D., Ershov, A.P., Jones, N.D. (eds.) Partial Evaluation and Mixed Computation, pp. 325–347. North-Holland, Amsterdam (1988)Google Scholar
  19. 19.
    Mogensen, T. Æ.: Separating binding times in language specifications. In: Fourth International Conference on Functional Programming and Computer Architecture, London, UK, September 1989, pp. 14–25. ACM Press and Addison-Wesley (1989)Google Scholar
  20. 20.
    Mogensen, T. Æ.: Evolution of partial evaluators: removing inherited limits. In: Danvy, O., Thiemann, P., Glück, R. (eds.) Dagstuhl Seminar 1996. LNCS, vol. 1110, pp. 303–321. Springer, Heidelberg (1996)Google Scholar
  21. 21.
    Sestoft, P.: The structure of a self-applicable partial evaluator. In: Ganzinger, H., Jones, N.D. (eds.) Programs as Data Objects. LNCS, vol. 217, pp. 236–256. Springer, Heidelberg (1985)Google Scholar
  22. 22.
    Sestoft, P.: ML pattern match compilation and partial evaluation. In: Danvy, O., Thiemann, P., Glück, R. (eds.) Dagstuhl Seminar 1996. LNCS, vol. 1110, pp. 446–464. Springer, Heidelberg (1996)Google Scholar
  23. 23.
    Skalberg, S.: Mechanical proof of the optimality of a partial evaluator. Master’s thesis, DIKU, Department of Computer Science, University of Copenhagen (1999)Google Scholar
  24. 24.
    Taha, W., Makholm, H., Hughes, J.: Tag elimination and Jones-optimality. In: Danvy, O., Filinski, A. (eds.) PADO 2001. LNCS, vol. 2053, pp. 257–275. Springer, Heidelberg (2001)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2004

Authors and Affiliations

  • Robert Glück
    • 1
  1. 1.PRESTO, JST & Institute for Software Production TechnologyWaseda University, School of Science and EngineeringTokyoJapan

Personalised recommendations