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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Abramsky, S., Jagadeesan, R., Malacaria, P.: Full abstraction for PCF. Inf. Comput. 163(2), 409–470 (2000)
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)
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)
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)
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)
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)
Danvy, O.: Defunctionalized interpreters for programming languages. In: Hook, J., Thiemann, P. (eds.) ICFP, pp. 131–142. ACM (2008)
Ghica, D.R.: Geometry of synthesis: a structured approach to VLSI design. In: Hofmann, M., Felleisen, M. (eds.) POPL, pp. 363–375. ACM (2007)
Ghica, D.R., Murawski, A.S., Ong, C.H.L.: Syntactic control of concurrency. Theor. Comput. Sci. 350(2-3), 234–251 (2006)
Hasegawa, M.: On traced monoidal closed categories. Mathematical Structures in Computer Science 19(2), 217–244 (2009)
Hofmann, M., Streicher, T.: Continuation models are universal for lambda-mu-calculus. In: LICS, pp. 387–395. IEEE Computer Society (1997)
Hyland, J.M.E., Ong, C.H.L.: On full abstraction for PCF: I, II, and III. Inf. Comput. 163, 285–408 (2000)
Joyal, A., Street, R., Verity, D.: Traced monoidal categories. Math. Proc. Cambridge Philos. Soc. 119(3), 447–468 (1996)
Levy, P.B.: Call-By-Push-Value: A Functional/Imperative Synthesis, Semantics Structures in Computation, vol. 2. Springer, Heidelberg (2004)
Melliès, P.A., Tabareau, N.: An algebraic account of references in game semantics. Electr. Notes Theor. Comput. Sci. 249, 377–405 (2009)
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)
Pierce, B.C.: Types and programming languages. MIT Press (2002)
Plotkin, G.D.: Call-by-name, call-by-value and the lambda-calculus. Theor. Comput. Sci. 1(2), 125–159 (1975)
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)
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)
Streicher, T., Reus, B.: Classical logic, continuation semantics and abstract machines. J. Funct. Program. 8(6), 543–572 (1998)
Thielecke, H.: Categorical Structure of Continuation Passing Style. Ph.D. thesis, University of Edinburgh (1997)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)