Skip to main content

On Interaction, Continuations and Defunctionalization

  • Conference paper
Typed Lambda Calculi and Applications (TLCA 2013)

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

Included in the following conference series:

Abstract

In game semantics and related approaches to programming language semantics, programs are modelled by interaction dialogues. Such models have recently been used in the design of new compilation methods, e.g. in Ghica’s approach to hardware synthesis, or in joint work with Dal Lago on programming with sublinear space. This paper relates such semantically motivated non-standard compilation methods to more standard techniques in the compilation of functional programming languages, such as continuation passing and defunctionalization. We first show for the linear λ-calculus that interpretation in a model of computation by interaction can be described as a call-by-name CPS transformation followed by a defunctionalization procedure that takes into account control-flow information. We then use the interactive model to guide the extension of the compositional translation to source languages with full contraction and recursion.

I thank the anonymous referees for their helpful feedback and suggestions.

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 54.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 72.00
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. Abramsky, S., Jagadeesan, R., Malacaria, P.: Full abstraction for PCF. Inf. Comput. 163(2), 409–470 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  2. Banerjee, A., Heintze, N., Riecke, J.G.: Design and correctness of program transformations based on control-flow analysis. In: Kobayashi, N., Pierce, B.C. (eds.) TACS 2001. LNCS, vol. 2215, pp. 420–447. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  3. Cejtin, H., Jia, L., Weeks, S.: Flow-directed closure conversion for typed languages. In: Smolka, G. (ed.) ESOP 2000. LNCS, vol. 1782, pp. 56–71. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  4. Dal Lago, U., Schöpp, U.: Functional programming in sublinear space. In: Gordon, A.D. (ed.) ESOP 2010. LNCS, vol. 6012, pp. 205–225. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  5. Dal Lago, U., Schöpp, U.: Type inference for sublinear space functional programming. In: Ueda, K. (ed.) APLAS 2010. LNCS, vol. 6461, pp. 376–391. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  6. Danos, V., Herbelin, H., Regnier, L.: Game semantics and abstract machines. In: Proceedings of the 11th IEEE Symposium on Logic in Computer Science (LICS 1996), pp. 394–405. IEEE, Los Alamitos (1996)

    Google Scholar 

  7. Danvy, O.: Defunctionalized interpreters for programming languages. In: Hook, J., Thiemann, P. (eds.) ICFP, pp. 131–142. ACM (2008)

    Google Scholar 

  8. Ghica, D.R.: Geometry of synthesis: a structured approach to VLSI design. In: Hofmann, M., Felleisen, M. (eds.) POPL, pp. 363–375. ACM (2007)

    Google Scholar 

  9. Ghica, D.R., Murawski, A.S., Ong, C.H.L.: Syntactic control of concurrency. Theor. Comput. Sci. 350(2-3), 234–251 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  10. Hasegawa, M.: On traced monoidal closed categories. Mathematical Structures in Computer Science 19(2), 217–244 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  11. Hofmann, M., Streicher, T.: Continuation models are universal for lambda-mu-calculus. In: LICS, pp. 387–395. IEEE Computer Society (1997)

    Google Scholar 

  12. Hyland, J.M.E., Ong, C.H.L.: On full abstraction for PCF: I, II, and III. Inf. Comput. 163, 285–408 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  13. Joyal, A., Street, R., Verity, D.: Traced monoidal categories. Math. Proc. Cambridge Philos. Soc. 119(3), 447–468 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  14. Levy, P.B.: Call-By-Push-Value: A Functional/Imperative Synthesis, Semantics Structures in Computation, vol. 2. Springer, Heidelberg (2004)

    Google Scholar 

  15. Melliès, P.A., Tabareau, N.: An algebraic account of references in game semantics. Electr. Notes Theor. Comput. Sci. 249, 377–405 (2009)

    Article  Google Scholar 

  16. Nigam, V., Miller, D.: Algorithmic specifications in linear logic with subexponentials. In: Proceedings of the 11th International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming (PPDP 2009), pp. 129–140. ACM, New York (2009)

    Google Scholar 

  17. Pierce, B.C.: Types and programming languages. MIT Press (2002)

    Google Scholar 

  18. Plotkin, G.D.: Call-by-name, call-by-value and the lambda-calculus. Theor. Comput. Sci. 1(2), 125–159 (1975)

    Article  MathSciNet  MATH  Google Scholar 

  19. Reynolds, J.C.: Definitional interpreters for higher-order programming languages. In: Proceedings of the ACM Annual Conference, ACM 1972, vol. 2, pp. 717–740. ACM, New York (1972)

    Google Scholar 

  20. Schöpp, U.: Stratified bounded affine logic for logarithmic space. In: Proceedings of the 22nd IEEE Symposium on Logic in Computer Science (LICS 2007), pp. 411–420. IEEE (2007)

    Google Scholar 

  21. Streicher, T., Reus, B.: Classical logic, continuation semantics and abstract machines. J. Funct. Program. 8(6), 543–572 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  22. Thielecke, H.: Categorical Structure of Continuation Passing Style. Ph.D. thesis, University of Edinburgh (1997)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Schöpp, U. (2013). On Interaction, Continuations and Defunctionalization. In: Hasegawa, M. (eds) Typed Lambda Calculi and Applications. TLCA 2013. Lecture Notes in Computer Science, vol 7941. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-38946-7_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-38946-7_16

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-38945-0

  • Online ISBN: 978-3-642-38946-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics