Skip to main content

An Experiment with the Fourth Futamura Projection

  • Conference paper
Perspectives of Systems Informatics (PSI 2009)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 5947))

Abstract

We have experimentally validated the theoretical insight, that a compiler generator is an Ershov generating extension of a program specializer, by showing that an existing offline partial evaluator can perform the fourth Futamura projection. Specifically, an online and an offline partial evaluator for an imperative flowchart language were transformed into two new compiler generators by Romanenko’s classical partial evaluator Unmix. The two partial evaluators are described, as is a novel recursive method for polyvariant specialization. The new compiler generators are demonstrated by converting a universal parser into a parser generator. These results strongly indicate that existing partial evaluation techniques can be put to work on several new applications. To date, all previous compiler generators based on partial evaluation were either generated by self-application or handwritten. None of these works considered the generation of one compiler generator by another.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bulyonkov, M.A.: Polyvariant mixed computation for analyzer programs. Acta Informatica 21(5), 473–484 (1984)

    Article  MATH  MathSciNet  Google Scholar 

  2. Christensen, N.H., Glück, R.: Offline partial evaluation can be as accurate as online partial evaluation. ACM TOPLAS 26(1), 191–220 (2004)

    Article  Google Scholar 

  3. Debois, S.: Imperative-program transformation by instrumented-interpreter specialization. Higher-Order and Symbolic Computation 21(1-2), 37–58 (2008)

    Article  MATH  Google Scholar 

  4. Ershov, A.P.: On the partial computation principle. Information Processing Letters 6(2), 38–41 (1977)

    Article  MATH  Google Scholar 

  5. Futamura, Y.: Partial computation of programs. In: Goto, E., Nakajima, R., Yonezawa, A., Nakata, I., Furukawa, K. (eds.) RIMS 1982. LNCS, vol. 147, pp. 1–35. Springer, Heidelberg (1983)

    Google Scholar 

  6. Futamura, Y.: Partial evaluation of computation process, revisited. Higher-Order and Symbolic Computation 12(4), 377–380 (1999)

    Article  Google Scholar 

  7. Futamura, Y., Konishi, Z., Glück, R.: WSDFU: Program transformation system based on generalized partial computation. In: Mogensen, T.Æ., Schmidt, D.A., Sudborough, I.H. (eds.) The Essence of Computation. LNCS, vol. 2566, pp. 358–378. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  8. Gade, J., Glück, R.: On Jones-optimal specializers: a case study using Unmix. In: Kobayashi, N. (ed.) APLAS 2006. LNCS, vol. 4279, pp. 406–422. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  9. Glück, R.: An investigation of Jones optimality and BTI-universal specializers. Higher-Order and Symbolic Computation 21(3), 283–309 (2008)

    Article  MATH  Google Scholar 

  10. Glück, R.: Is there a fourth Futamura projection? Partial Evaluation and Program Manipulation. Proceedings, pp. 51–60. ACM Press, New York (2009)

    Google Scholar 

  11. Glück, R., Jørgensen, J.: Efficient multi-level generating extensions for program specialization. In: Hermenegildo, M., Swierstra, S.D. (eds.) PLILP 1995. LNCS, vol. 982, pp. 259–278. Springer, Heidelberg (1995)

    Chapter  Google Scholar 

  12. Glück, R., Kawada, Y., Hashimoto, T.: Transforming interpreters into inverse interpreters by partial evaluation. In: Proceedings of Partial Evaluation and Semantics-Based Program Manipulation, pp. 10–19. ACM Press, New York (2003)

    Google Scholar 

  13. Glück, R., Klimov, A.V.: Occam’s razor in metacomputation: the notion of a perfect process tree. In: Cousot, P., Falaschi, M., Filé, G., Rauzy, A. (eds.) WSA 1993. LNCS, vol. 724, pp. 112–123. Springer, Heidelberg (1993)

    Google Scholar 

  14. Gomard, C.K., Jones, N.D.: Compiler generation by partial evaluation: a case study. Structured Programming 12, 123–144 (1991)

    Google Scholar 

  15. Hatcliff, J.: An introduction to online and offline partial evaluation using a simple flowchart language. In: Hatcliff, J., Mogensen, T. Æ., Thiemann, P. (eds.) DIKU 1998. LNCS, vol. 1706, pp. 20–82. Springer, Heidelberg (1999)

    Google Scholar 

  16. Holst, C.K.: Language triplets: the Amix approach. In: Bjørner, D., et al. (eds.) Partial Evaluation and Mixed Computation, pp. 167–185. North-Holland, Amsterdam (1988)

    Google Scholar 

  17. Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice-Hall, Englewood Cliffs (1993)

    MATH  Google Scholar 

  18. Jones, N.D., Sestoft, P., Søndergaard, H.: Mix: a self-applicable partial evaluator for experiments in compiler generation. Lisp and Symbolic Computation 2(1), 9–50 (1989)

    Article  Google Scholar 

  19. Klimov, A.V., Romanenko, S.A.: Metavychislitel’ dlja jazyka Refal. Osnovnye ponjatija i primery (A metaevaluator for the language Refal. Basic concepts and examples). Preprint 71, Keldysh Institute of Applied Mathematics, Academy of Sciences of the USSR, Moscow (1987) (in Russian)

    Google Scholar 

  20. Romanenko, S.A.: Arity raiser and its use in program specialization. In: Jones, N.D. (ed.) ESOP 1990. LNCS, vol. 432, pp. 341–360. Springer, Heidelberg (1990)

    Google Scholar 

  21. Romanenko, S.A.: The specializer Unmix (1990), Program and documentation, ftp://ftp.diku.dk/pub/diku/dists/jones-book/Romanenko/

  22. Ruf, E., Weise, D.: On the specialization of online program specializers. Journal of Functional Programming 3(3), 251–281 (1993)

    Article  Google Scholar 

  23. Sumii, E., Kobayashi, N.: Online-and-offline partial evaluation: a mixed approach. In: Proceedings of Partial Evaluation and Semantics-Based Program Manipulation, pp. 12–21. ACM Press, New York (2000)

    Google Scholar 

  24. Turchin, V.F.: The concept of a supercompiler. ACM TOPLAS 8(3), 292–325 (1986)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Glück, R. (2010). An Experiment with the Fourth Futamura Projection. In: Pnueli, A., Virbitskaite, I., Voronkov, A. (eds) Perspectives of Systems Informatics. PSI 2009. Lecture Notes in Computer Science, vol 5947. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-11486-1_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-11486-1_12

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-11485-4

  • Online ISBN: 978-3-642-11486-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics