Skip to main content

Refunctionalization at Work

  • Conference paper
Mathematics of Program Construction (MPC 2006)

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

Included in the following conference series:

Abstract

First-order programs are desired in a variety of settings and for a variety of reasons. Their coming into existence in first-order form may be unplanned or it could be the deliberate result of a form of “firstification” such as closure conversion, (super)combinator conversion, or defunctionalization. In the latter case, they are higher-order programs in disguise, just as iterative programs with accumulators are often recursive programs in disguise.

This talk is about Reynolds’s defunctionalization [1, 2]. Over the last few years, we have observed that a number of existing first-order programs turn out to be in the range of defunctionalization, and therefore they directly correspond to higher-order programs, even though they were designed independently of any higher-order representation. Not all first-order programs, however, are in defunctionalized form.

The goal of this talk is to refine our earlier characterization of what it means to be in defunctionalized form [3], and to investigate how one can tease a first-order program into defunctionalized form. On the way, we present a variety of independently known programs that are in (or can be teased into) defunctionalized form, and we exhibit their functional counterpart—a process we refer to as ‘refunctionalization’ since it is a left inverse of defunctionalization.

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

References

  1. Reynolds, J.C.: Definitional interpreters for higher-order programming languages. In: Proc.of 25th ACM Nat. Conf., pp. 717–740. ACM Press, New York (1972); Reprinted in Higher-Order and Symb. Comput. 11(4), 363–397 (1998)

    Google Scholar 

  2. Reynolds, J.C.: Definitional interpreters revisited. Higher-Order and Symb. Comput. 11(4), 355–361 (1998)

    Article  MATH  Google Scholar 

  3. Danvy, O., Nielsen, L.R.: Defunctionalization at work. In: Proc. of 3rd Int. ACM SIGPLAN Conf. on Principles and Practice of Declarative Programming PPDP 2001, pp. 162–174. ACM Press, New York (2001)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Danvy, O. (2006). Refunctionalization at Work. In: Uustalu, T. (eds) Mathematics of Program Construction. MPC 2006. Lecture Notes in Computer Science, vol 4014. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11783596_2

Download citation

  • DOI: https://doi.org/10.1007/11783596_2

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-35631-8

  • Online ISBN: 978-3-540-35632-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics