{"id":2134,"date":"2019-08-19T20:03:06","date_gmt":"2019-08-20T05:03:06","guid":{"rendered":"http:\/\/prg.is.titech.ac.jp\/?p=2134"},"modified":"2019-07-11T00:08:19","modified_gmt":"2019-07-11T09:08:19","slug":"paper-on-compilation-of-functional-languages-at-icfp-2019","status":"publish","type":"post","link":"https:\/\/prg.is.titech.ac.jp\/ja\/news\/paper-on-compilation-of-functional-languages-at-icfp-2019\/","title":{"rendered":"ICFP 2019 \u3067\u306e\u767a\u8868"},"content":{"rendered":"<p><a href=\"https:\/\/prg.is.titech.ac.jp\/ja\/people\/cong\">\u53e2\u60a0\u60a0<\/a>\u304c\u95a2\u6570\u578b\u8a00\u8a9e\u306e\u56fd\u969b\u4f1a\u8b70\u00a0<a href=\"https:\/\/icfp19.sigplan.org\">ICFP 2019<\/a>\u00a0\u3067\u4ee5\u4e0b\u306e\u8ad6\u6587\u3092\u767a\u8868\u3057\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u30bf\u30a4\u30c8\u30eb<\/strong>: Compiling with Continuations, or without? Whatever.<\/p>\n<p><strong>\u8457\u8005<\/strong>: <a href=\"https:\/\/prg.is.titech.ac.jp\/people\/cong\">Youyou Cong<\/a>, <a href=\"https:\/\/losvald.github.io\/\">Leo Osvald<\/a>, <a href=\"https:\/\/www.linkedin.com\/in\/gregory-essertel-7317b978\">Gregory Essertel<\/a>, and <a href=\"http:\/\/tiarkrompf.github.io\/\">Tiark Rompf<\/a><\/p>\n<p><strong>\u6982\u8981<\/strong>:<\/p>\n<p>What makes a good compiler IR?\u00a0 In the context of functional languages, there has been an extensive debate on the advantages and disadvantages of continuation-passing-style (CPS).\u00a0 The consensus seems to be that some form of explicit\u00a0continuations is necessary to model jumps in\u00a0a functional style, but that they should have a 2nd-class status, separate from regular functions, to ensure efficient code generation.\u00a0 Building on this observation, a recent study from PLDI 2017 proposed a direct-style IR with explicit join points, which essentially represent local continuations, i.e., functions that do not return or escape.\u00a0 While this IR can work well in practice, as evidenced by the implementation of join points in the Glasgow Haskell Compiler (GHC), there still seems to be room for improvement, especially with regard to the way continuations are handled in the course of optimization.<\/p>\n<p>In this paper, we contribute to the CPS debate by developing a novel IR with the following features.\u00a0 \u00a0First, we integrate a control operator that resembles Felleisen&#8217;s C, eliminating certain redundant rewrites observed in the previous study.\u00a0 Second, we treat the non-returning and non-escaping aspects of continuations separately, allowing efficient compilation of well-behaved functions defined by the user.\u00a0 Third, we define a selective CPS translation of our IR, which erases control operators while preserving the meaning and typing of programs.\u00a0 These features enable optimizations in both direct style and full CPS, as well as in any intermediate style with selectively exposed continuations.\u00a0 Thus, we change the spectrum of available options from &#8220;CPS yes or no&#8221; to &#8220;as much or as little CPS as you want, when you want it&#8221;.<\/p>","protected":false},"excerpt":{"rendered":"<p>\u53e2\u60a0\u60a0\u304c\u95a2\u6570\u578b\u8a00\u8a9e\u306e\u56fd\u969b\u4f1a\u8b70\u00a0ICFP 2019\u00a0\u3067\u4ee5\u4e0b\u306e\u8ad6\u6587\u3092\u767a\u8868\u3057\u307e\u3059\u3002 &nbsp; \u30bf\u30a4\u30c8\u30eb: Compiling with Continuations, or without? Whatever. \u8457\u8005: Yo&hellip; <a class=\"continue\" href=\"https:\/\/prg.is.titech.ac.jp\/ja\/news\/paper-on-compilation-of-functional-languages-at-icfp-2019\/\">Continue Reading ICFP 2019 \u3067\u306e\u767a\u8868<\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-2134","post","type-post","status-publish","format-standard","hentry","category-news","radius"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/prg.is.titech.ac.jp\/ja\/wp-json\/wp\/v2\/posts\/2134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prg.is.titech.ac.jp\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prg.is.titech.ac.jp\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prg.is.titech.ac.jp\/ja\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/prg.is.titech.ac.jp\/ja\/wp-json\/wp\/v2\/comments?post=2134"}],"version-history":[{"count":5,"href":"https:\/\/prg.is.titech.ac.jp\/ja\/wp-json\/wp\/v2\/posts\/2134\/revisions"}],"predecessor-version":[{"id":2142,"href":"https:\/\/prg.is.titech.ac.jp\/ja\/wp-json\/wp\/v2\/posts\/2134\/revisions\/2142"}],"wp:attachment":[{"href":"https:\/\/prg.is.titech.ac.jp\/ja\/wp-json\/wp\/v2\/media?parent=2134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prg.is.titech.ac.jp\/ja\/wp-json\/wp\/v2\/categories?post=2134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prg.is.titech.ac.jp\/ja\/wp-json\/wp\/v2\/tags?post=2134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}